protected function _actionConfig(KObjectConfig $config) { if ($this->verb == 'add') { $config->append(array('objectName' => 'added')); } parent::_actionConfig($config); }
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; }
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); }
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); }
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); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'formats' => array('json') )); parent::_initialize($config); }
/** * 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); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'path' => '' )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'model' => 'lib:model.empty' )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'view' => 'files' )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'priority' => self::PRIORITY_HIGH )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'thumbnail_size' => array('x' => 64, 'y' => 64) )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'validator' => true )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'identity_key' => 'name' )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'priority' => KCommandHandlerInterface::PRIORITY_HIGH )); parent::_initialize($config); }
/** * 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); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'state' => 'com:files.model.state' )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'auto_fetch' => false )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'behaviors' => array('thumbnailable') )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( // This is high priority to run before alias filter which would replace icon:// prefixes 'priority' => self::PRIORITY_HIGH, )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'formats' => array('json', 'rss'), 'model' => 'com://site/docman.model.documents' )); parent::_initialize($config); }
/** * Initializes the options for the object. * * Called from {@link __construct()} as a first step of object instantiation. * * @param KObjectConfig $config Configuration options. */ protected function _initialize(KObjectConfig $config) { $config->append(array('priority' => self::PRIORITY_LOWEST, 'loggers' => array())); // Append the default logger if none is set. if (!count($config->loggers)) { $config->append(array('loggers' => array('com:activities.activity.logger'))); } parent::_initialize($config); }
/** * Render item pagination * * @param array|KObjectConfig $config An optional array with configuration options * @return string Html * @see http://developer.yahoo.com/ypatterns/navigation/pagination/ */ public function pagination($config = array()) { $config = new KObjectConfig($config); $config->append(array( 'attribs' => array('onchange' => 'this.form.submit();') )); return parent::pagination($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'redirect_schemes' => array('http', 'https'), 'redirect_unknown' => true, )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'behaviors' => array('pageable'), 'auto_fetch' => false )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'formats' => array('json'), 'behaviors' => array('thumbnailable', 'findable', 'filterable') )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'formats' => array('json', 'rss'), 'model' => 'com://site/docman.model.categories', 'behaviors' => array('persistable') )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { if ($mixer = $config->mixer) { $model = sprintf('%s_%s', $mixer->getIdentifier()->getName(), 'relations'); } else { $model = 'relations'; } $config->append(array('model' => $model, 'columns' => array('table' => 'cmd', 'row' => 'cmd'))); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'behaviors' => array('notifiable', 'editable'), 'toolbars' => array('submit'), 'model' => 'documents' )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'behaviors' => array('redirectable', 'previewable'), 'model' => 'documents', 'view' => 'download' )); parent::_initialize($config); }