当前位置: 首页>>代码示例>>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;未经允许,请勿转载。