/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('after.add', array($this, 'addMentionsFromBody')); $this->registerCallback('after.edit', array($this, 'updateMentionsFromBody')); $this->registerCallback(array('after.add', 'after.edit'), array($this, 'notifyMentioned')); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'thumbnail_size' => array('x' => 64, 'y' => 64) )); parent::_initialize($config); }
/** * Initializes the options for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options * @return void */ protected function _initialize(KConfig $config) { $config->append(array( 'modules' => array('toolbar', 'title', 'submenu') )); parent::_initialize($config); }
/** * Initializes the default configuration for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options. * @return void */ protected function _initialize(KConfig $config) { $config->append(array( 'toolbar' => null, )); parent::_initialize($config); }
/** * Command handler * * @param string The command name * @param object The command context * @return boolean Can return both true or false. */ public function execute($name, KCommandContext $context) { $parts = explode('.', $name); if ($parts[0] == 'before') { $this->_fetchOwner($context); } parent::execute($name, $context); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'priority' => self::PRIORITY_HIGH )); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'redirect_schemes' => array('http', 'https'), 'redirect_unknown' => true, )); 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); }
protected function _initialize(KConfig $config) { $config->append(array('format' => 'csv', 'limit' => 50)); if (!$config->behavior) { $identifier = clone $this->getIdentifier(); $identifier->path = array('database', 'behavior'); $config->behavior = $identifier; } parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'container' => 'docman-images', 'folder' => 'generated', 'thumbnail_size' => array('x' => 512, 'y' => 512) )); parent::_initialize($config); }
/** * Initializes the default configuration for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options. * @return void */ protected function _initialize(KConfig $config) { $config->append(array( 'priority' => KCommand::PRIORITY_HIGH, 'readonly' => false, 'auto_mixin' => true )); parent::_initialize($config); }
/** * Constructor. * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); $this->_consumer = $config->consumer; if ($config->api) { $this->_api = $config->api; $this->_api->setConsumer($this->_consumer); } $this->registerActionAlias('post', 'oauthorize'); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'priority' => KCommandHandlerAbstract::PRIORITY_LOW )); if (empty($config->vars)) { $config->vars = array('sort'); } parent::_initialize($config); }
/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); if (strpos(KRequest::protocol(), 'http') !== false) { $this->registerCallback('before.read', array($this, 'setReferrer')); $this->registerCallback('after.save', array($this, 'unsetReferrer')); $this->registerCallback('after.cancel', array($this, 'unsetReferrer')); } $this->registerCallback('after.read', array($this, 'lockResource')); $this->registerCallback('after.save', array($this, 'unlockResource')); $this->registerCallback('after.cancel', array($this, 'unlockResource')); //Set the default redirect. $this->setRedirect(KRequest::referrer()); }
/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); if ($this->isDispatched() && KRequest::type() == 'HTTP') { $this->registerCallback('before.read', array($this, 'setReferrer')); $this->registerCallback('after.apply', array($this, 'lockReferrer')); $this->registerCallback('after.read', array($this, 'unlockReferrer')); $this->registerCallback('after.save', array($this, 'unsetReferrer')); $this->registerCallback('after.cancel', array($this, 'unsetReferrer')); } $this->registerCallback('after.read', array($this, 'lockResource')); $this->registerCallback('after.save', array($this, 'unlockResource')); $this->registerCallback('after.cancel', array($this, 'unlockResource')); //Set the default redirect. $this->setRedirect(KRequest::referrer()); }
protected function _initialize(KConfig $config) { $config->append(array('og' => false, 'properties' => array('title' => 'title', 'description' => 'description', 'keywords' => '', 'og:title' => 'title'), 'values' => array('og:type' => 'article', 'og:url' => KRequest::url(), 'og:site_name' => JFactory::getConfig()->get('sitename')))); $this->properties = new KConfig($config->properties); $this->values = new KConfig($config->values); $this->og = $config->og; // Remove properties which are already set in the values: foreach ($this->values as $value) { foreach ($this->properties as $property) { if ($value == $property) { unset($this->properties[$value]); } } } parent::_initialize($config); }
/** * Initializes the options for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options * @return void */ protected function _initialize(KConfig $config) { $config->append(array('modules' => array('toolbar', 'title', 'submenu', 'left'), 'force_cache' => false)); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array('priority' => KCommandHandlerAbstract::PRIORITY_LOWEST)); parent::_initialize($config); }
protected function _initialize(KConfig $config) { $config->append(array('token' => 'c7326a714a1275378a6d4608f547737b')); parent::_initialize($config); }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. * * @return void */ public function __construct(KConfig $config) { parent::__construct($config); $config->mixer->registerCallback(array('before.unfollow', 'before.follow', 'before.lead', 'before.unlead', 'before.addrequest', 'before.deleterequest', 'before.block', 'before.unblock'), array($this, 'getActor')); }
/** * Initializes the default configuration for the object. * * Called from {@link __construct()} as a first step of object instantiation. * * @param KConfig $config An optional KConfig object with configuration options. */ protected function _initialize(KConfig $config) { $config->append(array('base_url' => KRequest::url(), 'test_options' => array('enabled' => get_config_value('mailer.debug', false), 'email' => get_config_value('mailer.redirect_email'), 'log' => JFactory::getConfig()->getValue('tmp_path') . '/emails/'), 'template_view' => null)); parent::_initialize($config); }
/** * Mixin Notifier * * This function is called when the mixin is being mixed. It will get the mixer passed in. * * @param KObjectMixable $mixer The mixer object * @return void */ public function onMixin(KObjectMixable $mixer) { parent::onMixin($mixer); //Create and mixin the permission if it's doesn't exist yet if (!$this->_permission instanceof KDispatcherPermissionInterface) { $permission = $this->_permission; if (!$permission || is_string($permission) && strpos($permission, '.') === false) { $identifier = $mixer->getIdentifier()->toArray(); $identifier['path'] = array('dispatcher', 'permission'); if ($permission) { $identifier['name'] = $permission; } $permission = $this->getIdentifier($identifier); } if (!$permission instanceof KObjectIdentifierInterface) { $permission = $this->getIdentifier($permission); } $this->_permission = $mixer->mixin($permission); } }
/** * Initializes the default configuration for the object. * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options. */ protected function _initialize(KConfig $config) { $config->append(array('repository' => $config->mixer->getIdentifier()->name, 'priority' => KCommand::PRIORITY_HIGHEST)); parent::_initialize($config); }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. * * @return void */ public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('after.add', array($this, 'addCover')); $this->registerCallback('after.edit', array($this, 'editCover')); }
protected function _initialize(KConfig $config) { $config->append(array('priority' => KCommand::PRIORITY_LOWEST, 'actions' => array('after.edit', 'after.add', 'after.delete'), 'title_column' => array('title', 'name'))); parent::_initialize($config); }
/** * Removes the methods that are blacklisted * * (non-PHPdoc) * @see KMixinAbstract::getMethods() */ public function getMethods() { $methods = parent::getMethods(); $methods = array_diff($methods, $this->_exclude_actions); return $methods; }
/** * Initializes the options for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options. * @return void */ protected function _initialize(KConfig $config) { $log = JLog::getInstance('system_log.php'); $config->append(array('log' => $log)); parent::_initialize($config); }
protected function _initialize(KConfig $config) { $config->append(array('priority' => KCommand::PRIORITY_HIGHEST)); parent::_initialize($config); }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback(array('before.confirmrequest', 'before.ignorerequest'), array($this, 'fetchRequester')); $this->registerCallback(array('before.addadmin', 'before.removeadmin'), array($this, 'fetchAdmin')); }
public function __construct(KConfig $config) { parent::__construct($config); $this->verifyConfig = $config->verify ? $config->verify : array(); $this->fieldsProperty = $config->fieldsProperty ? $config->fieldsProperty : ''; }