本文整理汇总了PHP中KObjectConfig类的典型用法代码示例。如果您正苦于以下问题:PHP KObjectConfig类的具体用法?PHP KObjectConfig怎么用?PHP KObjectConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了KObjectConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _actionConfig
protected function _actionConfig(KObjectConfig $config)
{
if ($this->verb == 'add') {
$config->append(array('objectName' => 'added'));
}
parent::_actionConfig($config);
}
示例2: _fetchData
protected function _fetchData(KViewContext $context)
{
$state = $this->getModel()->getState();
$container = $this->getModel()->getContainer();
$config = new KObjectConfig($state->config);
$config->append(array('router' => array('defaults' => array('option' => 'com_' . substr($container->slug, 0, strpos($container->slug, '-')), 'routed' => '1')), 'initial_response' => true))->append($this->getConfig()->config);
if ($config->initial_response === true) {
$count = 0;
$query = $state->getValues();
unset($query['config']);
$query['thumbnails'] = $this->getModel()->getContainer()->getParameters()->thumbnails;
if (strpos($this->getLayout(), 'compact') !== false) {
$query['limit'] = 0;
$count = ComFilesIteratorDirectory::countNodes(array('path' => $this->getModel()->getPath()));
}
if ($count < 100) {
$controller = $this->getObject('com:files.controller.node');
$controller->getRequest()->setQuery($query);
$config->initial_response = $controller->format('json')->render();
} else {
unset($config->initial_response);
}
}
$state->config = $config->toArray();
$context->data->sitebase = trim(JURI::root(), '/');
$context->data->token = $this->getObject('user')->getSession()->getToken();
$context->data->container = $container;
$context->data->debug = KClassLoader::getInstance()->isDebug();
parent::_fetchData($context);
$context->parameters = $state->getValues();
$context->parameters->config = $config;
}
示例3: _objectConfig
protected function _objectConfig(KObjectConfig $config)
{
$metadata = $this->getMetadata();
$url = sprintf('option=com_jevents&task=icalrepeat.edit&cid[]=%d&evid=%d', $this->row, $metadata->event->id);
$config->append(array('type' => array('url' => array('admin' => $url), 'find' => 'object'), 'subtype' => array('objectName' => 'event', 'object' => true)));
parent::_objectConfig($config);
}
示例4: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'relation_table' => 'docman_category_relations',
'behaviors' => array(
'permissible',
'lockable',
'sluggable',
'creatable',
'modifiable',
'identifiable',
'orderable',
'parameterizable',
'nestable' => array('relation_table' => 'docman_category_relations')
),
'column_map' => array(
'parameters' => 'params'
),
'filters' => array(
'parameters' => array('json'),
'title' => array('trim'),
'slug' => array('trim'),
'description' => array('trim', 'html')
)
));
parent::_initialize($config);
}
示例5: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'behaviors' => array(
'permissible',
'lockable',
'creatable',
'modifiable',
'sluggable',
'identifiable',
'hittable',
'parameterizable',
'timezonable' => array('fields' => array('publish_on', 'unpublish_on'))
),
'column_map' => array(
'parameters' => 'params',
'touched_on' => 'GREATEST(tbl.created_on, tbl.modified_on)'
),
'filters' => array(
'parameters' => array('json'),
'title' => array('trim'),
'slug' => array('trim'),
'storage_type' => array('com://admin/docman.filter.identifier'),
'description' => array('trim', 'html')
)
));
parent::_initialize($config);
}
示例6: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'formats' => array('json')
));
parent::_initialize($config);
}
示例7: _initialize
/**
* Initializes the options for the object
*
* Called from {@link __construct()} as a first step of object instantiation.
*
* @param KObjectConfig $config An optional ObjectConfig object with configuration options
*/
protected function _initialize(KObjectConfig $config)
{
$self = $this;
$config->append(array('autoescape' => true, 'strict_variables' => false, 'optimizations' => -1, 'functions' => array('import' => function ($url, $data) use($self) {
return $self->_import($url, $data);
})));
parent::_initialize($config);
}
示例8: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'model' => 'lib:model.empty'
));
parent::_initialize($config);
}
示例9: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'priority' => self::PRIORITY_HIGH
));
parent::_initialize($config);
}
示例10: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'thumbnail_size' => array('x' => 64, 'y' => 64)
));
parent::_initialize($config);
}
示例11: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'validator' => true
));
parent::_initialize($config);
}
示例12: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'priority' => KCommandHandlerInterface::PRIORITY_HIGH
));
parent::_initialize($config);
}
示例13: _initialize
/**
* Initializes the options for the object
*
* Called from {@link __construct()} as a first step of object instantiation.
*
* @param KObjectConfig $config Configuration options
* @return void
*/
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'entity' => 'document',
));
parent::_initialize($config);
}
示例14: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'state' => 'com:files.model.state'
));
parent::_initialize($config);
}
示例15: _initialize
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'auto_fetch' => false
));
parent::_initialize($config);
}