當前位置: 首頁>>代碼示例>>PHP>>正文


PHP modResource::__construct方法代碼示例

本文整理匯總了PHP中modResource::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP modResource::__construct方法的具體用法?PHP modResource::__construct怎麽用?PHP modResource::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在modResource的用法示例。


在下文中一共展示了modResource::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 /**
  * Overrides the modResource constructor to set the response class and class_key for this Resource type
  * @param xPDO $xpdo
  */
 function __construct(xPDO &$xpdo)
 {
     parent::__construct($xpdo);
     $this->_fields['class_key'] = 'modJSONRPCResource';
     $this->xpdo->setOption('modResponse.class', 'jsonrpc.modJSONRPCResponse');
     $this->showInContextMenu = false;
 }
開發者ID:semencov-com,項目名稱:affiliate,代碼行數:11,代碼來源:modjsonrpcresource.class.php

示例2:

 /**
  * Overrides modResource::__construct to set the class key for this Resource type
  * @param xPDO $xpdo A reference to the xPDO|modX instance
  */
 function __construct(&$xpdo)
 {
     parent::__construct($xpdo);
     $this->set('type', 'reference');
     $this->set('class_key', 'modWebLink');
     $this->showInContextMenu = true;
 }
開發者ID:rosstimson,項目名稱:revolution,代碼行數:11,代碼來源:modweblink.class.php

示例3:

 /**
  * Override modResource::__construct to ensure a few specific fields are forced to be set.
  * @param xPDO $xpdo
  */
 function __construct(xPDO &$xpdo)
 {
     parent::__construct($xpdo);
     $this->set('class_key', 'Articles');
     $this->set('hide_children_in_tree', true);
     $this->salt = $xpdo->getOption('articles.twitter.salt', null, 'tw1tt3rs4uth4p1ish0rribl3');
 }
開發者ID:raadhuis,項目名稱:modx-basic,代碼行數:11,代碼來源:articlescontainer.class.php

示例4:

 function __construct(xPDO &$xpdo)
 {
     parent::__construct($xpdo);
     $this->set('class_key', 'Article');
     $this->set('show_in_tree', false);
     $this->set('richtext', true);
     $this->set('searchable', true);
 }
開發者ID:raadhuis,項目名稱:modx-basic,代碼行數:8,代碼來源:article.class.php

示例5: modxTalks

 function __construct(xPDO &$xpdo)
 {
     parent::__construct($xpdo);
     /*
     require_once MODX_CORE_PATH.'components/modxtalks/model/modxtalks/modxtalks.class.php';
     $this->modxtalks = new modxTalks($xpdo);
     */
     $this->set('class_key', 'CommentsModxTalks');
 }
開發者ID:jolichter,項目名稱:modxTalks,代碼行數:9,代碼來源:commentsmodxtalks.class.php

示例6:

 /**
  * @param xPDO $xpdo
  */
 function __construct(xPDO &$xpdo)
 {
     parent::__construct($xpdo);
     $this->set('class_key', 'TicketsSection');
     $this->set('comments', 0);
     $this->set('views', 0);
     $this->set('votes', 0);
     $this->set('tickets', 0);
 }
開發者ID:soulcreate,項目名稱:Tickets,代碼行數:12,代碼來源:ticketssection.class.php

示例7: unset

 /**
  * {@inheritdoc}
  */
 function __construct(xPDO &$xpdo)
 {
     parent::__construct($xpdo);
     $fields = $this->xpdo->getFieldMeta('msProductData');
     unset($fields['id']);
     $this->dataFields = array_keys($fields);
     $aggregates = $this->xpdo->getAggregates('msProductData');
     $composites = $this->xpdo->getComposites('msProductData');
     $this->dataRelated = array_merge(array_keys($aggregates), array_keys($composites));
 }
開發者ID:Vitaliz,項目名稱:miniShop2,代碼行數:13,代碼來源:msproduct.class.php

示例8:

 function __construct(xPDO &$xpdo)
 {
     global $modx;
     parent::__construct($xpdo);
     $this->set('class_key', 'modTranslatedDocument');
     $language = $modx->getOption('cultureKey');
     $this->language = $modx->getOption('cultureKey');
     $this->_cacheKey = '[contextKey]/resources/' . $language . '/[id]';
     $this->_pagetitle = "arse";
 }
開發者ID:bendasvadim,項目名稱:modTranslatedDocument,代碼行數:10,代碼來源:modtranslateddocument.class.php

示例9:

 function __construct(&$xpdo)
 {
     parent::__construct($xpdo);
     $this->_fields['class_key'] = 'modJSONRPCResource';
     $this->xpdo->setOption('modResponse.class', 'jsonrpc.modJSONRPCResponse');
 }
開發者ID:JoeBlow,項目名稱:revolution,代碼行數:6,代碼來源:modjsonrpcresource.class.php

示例10:

 function __construct(xPDO &$xpdo)
 {
     parent::__construct($xpdo);
     $this->set('class_key', 'idfxResource');
 }
開發者ID:Piterden,項目名稱:IdentifyX,代碼行數:5,代碼來源:idfxresource.class.php

示例11:

 /**
  * Overrides modResource::__construct to set the class key for this Resource type
  * @param xPDO $xpdo A reference to the xPDO|modX instance
  */
 function __construct(&$xpdo)
 {
     parent::__construct($xpdo);
     $this->set('class_key', 'modStaticResource');
     $this->showInContextMenu = true;
 }
開發者ID:ChrstnMgcn,項目名稱:revolution,代碼行數:10,代碼來源:modstaticresource.class.php

示例12:

 function __construct(&$xpdo)
 {
     parent::__construct($xpdo);
     $this->set('class_key', 'modDocument');
 }
開發者ID:JoeBlow,項目名稱:revolution,代碼行數:5,代碼來源:moddocument.class.php

示例13:

 function __construct(xPDO &$xpdo)
 {
     parent::__construct($xpdo);
 }
開發者ID:bendasvadim,項目名稱:NewsModxBox,代碼行數:4,代碼來源:societytopic.class.php

示例14:

 /**
  *
  * @return string
  */
 function __construct(xPDO &$xpdo)
 {
     parent::__construct($xpdo);
     $this->set('class_key', 'Store');
     $this->set('hide_children_in_tree', true);
 }
開發者ID:carnevlu,項目名稱:repoman,代碼行數:10,代碼來源:store.class.php

示例15:

 function __construct(& $xpdo) {
     parent :: __construct($xpdo);
     $this->set('class_key','modStaticResource');
 }
開發者ID:raf3600,項目名稱:revolution,代碼行數:4,代碼來源:modstaticresource.class.php


注:本文中的modResource::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。