本文整理汇总了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;
}
示例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;
}
示例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');
}
示例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);
}
示例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');
}
示例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);
}
示例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));
}
示例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";
}
示例9:
function __construct(&$xpdo)
{
parent::__construct($xpdo);
$this->_fields['class_key'] = 'modJSONRPCResource';
$this->xpdo->setOption('modResponse.class', 'jsonrpc.modJSONRPCResponse');
}
示例10:
function __construct(xPDO &$xpdo)
{
parent::__construct($xpdo);
$this->set('class_key', 'idfxResource');
}
示例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;
}
示例12:
function __construct(&$xpdo)
{
parent::__construct($xpdo);
$this->set('class_key', 'modDocument');
}
示例13:
function __construct(xPDO &$xpdo)
{
parent::__construct($xpdo);
}
示例14:
/**
*
* @return string
*/
function __construct(xPDO &$xpdo)
{
parent::__construct($xpdo);
$this->set('class_key', 'Store');
$this->set('hide_children_in_tree', true);
}
示例15:
function __construct(& $xpdo) {
parent :: __construct($xpdo);
$this->set('class_key','modStaticResource');
}