public function __construct(KObjectConfig $config) { parent::__construct($config); $this->setThumbnailSize(KObjectConfig::unbox($config->thumbnail_size)); $this->_container = $config->container; $this->_folder = $config->folder; }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); $this->_template_view = $config->template_view; $this->_base_url = $config->base_url; $this->_test_options = $config->test_options; }
public function __construct(KObjectConfig $config) { parent::__construct($config); $this->_vars = $config->vars; $this->_params = JFactory::getApplication()->getMenu()->getActive()->params; }
/** * Constructor * * @param object An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); // Set the view identifier $this->_modules = KConfig::toData($config->modules); }
public function __construct(KObjectConfig $config) { parent::__construct($config); $this->_redirect_schemes = KObjectConfig::unbox($config->redirect_schemes); $this->_redirect_unknown = $config->redirect_unknown; }
public function __construct(KConfig $config) { parent::__construct($config); $this->_actions = KConfig::unbox($config->actions); $this->_title_column = KConfig::unbox($config->title_column); $this->_activity_controller = $config->activity_controller; }
/** * 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')); }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. * * @return void */ public function __construct(KConfig $config) { parent::__construct($config); //inverse of exclude_actions if (count($config->only)) { $actions = (array) $config['only']; $exclude = array(); foreach ($this->getMethods() as $method) { if (strpos($method, '_action') === 0) { $action = strtolower(substr($method, 7)); if (!in_array($action, $actions)) { $exclude[] = $action; } } } $config->append(array('except' => $exclude)); } if ($config->read_only) { $config->append(array('except' => array('add', 'edit', 'delete'))); } $config->append(array('identifiable' => array(), 'validatable' => array(), 'committable' => array())); $this->_mixer->addBehavior('identifiable', $config['identifiable']); $this->_mixer->addBehavior('validatable', $config['validatable']); $this->_mixer->addBehavior('committable', $config['committable']); $this->_exclude_actions = (array) $config['except']; foreach ($this->_exclude_actions as $i => $action) { $this->_exclude_actions[$i] = '_action' . ucfirst($action); } }
public function __construct(KConfig $config) { parent::__construct($config); $this->_format = $config->format; $this->_limit = $config->limit; $this->_filename = $config->filename; $this->_behavior = $config->behavior; }
public function __construct(KConfig $config) { parent::__construct($config); $this->_container = $config->container; $this->_populate_from_request = $config->populate_from_request; $this->_file_controller = $this->getService($config->file_controller, array('request' => array('container' => $this->_container))); $this->_attachment_controller = $this->getService($config->attachment_controller); $this->_attachment_limit = $config->attachment_limit; }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); $this->_repository = $config->repository; $config->append(array('identifiable_key' => $this->getRepository()->getDescription()->getIdentityProperty()->getName())); $this->_identifiable_key = $config->identifiable_key; //add the identifiable_key $this->getState()->insert($this->_identifiable_key, null, true); }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); //nullify the parent $this->setParent(null); //set the identifiable key. By default its set to pid $this->_identifiable_key = $config->identifiable_key; //insert the state $this->getState()->insert($this->_identifiable_key); }
/** * 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'); }
public function __construct(KConfig $config) { parent::__construct($config); $this->setThumbnailSize(KConfig::unbox($config->thumbnail_size)); if (!self::$_library_loaded) { @ini_set('memory_limit', '256M'); //Load the library $this->getService('koowa:loader')->loadIdentifier('com://admin/files.helper.phpthumb.phpthumb'); self::$_library_loaded = true; } }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. * * @return void */ public function __construct(KConfig $config) { parent::__construct($config); $this->_default = isset($config['default']) ? $config['default'] : null; //set the default actor $this->setActor($this->_default); //set the identifiable key. By default its set to oid $this->_identifiable_key = $config->identifiable_key; //$this->_default ? $this->_default->id : null $this->getState()->insert($this->_identifiable_key); }
/** * 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 KObjectConfig $config Configuration options */ public function __construct(KObjectConfig $config) { parent::__construct($config); $this->addCommandCallback('before.read', 'setReferrer'); $this->addCommandCallback('after.apply', '_lockReferrer'); $this->addCommandCallback('after.read', '_unlockReferrer'); $this->addCommandCallback('after.save', '_unsetReferrer'); $this->addCommandCallback('after.cancel', '_unsetReferrer'); $this->addCommandCallback('after.read', '_lockResource'); $this->addCommandCallback('after.save', '_unlockResource'); $this->addCommandCallback('after.cancel', '_unlockResource'); $this->_cookie_path = $config->cookie_path; $this->_cookie_name = $config->cookie_name; }
/** * Constructor. * * @param KObjectConfig $config Configuration options. */ public function __construct(KObjectConfig $config) { parent::__construct($config); // Create the logger queue $this->__queue = $this->getObject('lib:object.queue'); // Attach the loggers $loggers = KObjectConfig::unbox($config->loggers); foreach ($loggers as $key => $value) { if (is_numeric($key)) { $this->attachLogger($value); } else { $this->attachLogger($key, $value); } } }
public function __construct(KConfig $config) { parent::__construct($config); $this->setThumbnailSize(KConfig::unbox($config->thumbnail_size)); if (!self::$_library_loaded) { @ini_set('memory_limit', '256M'); //Load the library $this->getService('koowa:loader')->loadIdentifier('com://admin/files.helper.phpthumb.phpthumb'); self::$_library_loaded = true; } $path = JPATH_ROOT . '/joomlatools-files/docman-images/generated'; if (!is_dir($path)) { mkdir($path, 0755, true); } }
public function __construct(KObjectConfig $config) { parent::__construct($config); $this->setThumbnailSize(KObjectConfig::unbox($config->thumbnail_size)); if (!self::$_library_loaded) { @ini_set('memory_limit', '256M'); //Load the library require_once JPATH_LIBRARIES.'/koowa/components/com_files/helper/phpthumb/phpthumb.php'; self::$_library_loaded = true; } }
/** * 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()); }
/** * Constructor. * * @param KObjectConfig $config Configuration options * @throws UnexpectedValueException */ public function __construct(KObjectConfig $config) { parent::__construct($config); // Need to do this here as mixer is not yet ready in _initialize method if (empty($config->package)) { $config->package = $this->getMixer()->getIdentifier()->package; } $this->_package = $config->package; $this->_entity = $config->entity; $this->_model = $config->model; $this->_event_context = 'com_' . $config->package . '.' . $this->_entity; $this->_category_entity = $config->category_entity; if (empty($this->_entity)) { throw new UnexpectedValueException('Entity cannot be empty'); } }
/** * Constructor. * * @param KConfig $config An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); $this->_enabled = $config->enabled; $session = JFactory::getSession(); $data = array(); if ($this->_enabled) { $namespace = $this->_getQueueNamespace(false); $data = (array) $session->get($namespace->queue, new stdClass(), $namespace->namespace); } $config->mixer->getState()->flash = new ComApplicationControllerBehaviorMessageFlash($data); static $once; if (!$once) { $_SESSION['__controller_persistance'] = array('controller.queue' => new stdClass()); $once = true; } }
/** * Constructor. * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); $this->_readonly = (bool) $config->readonly; }
/** * Constructor * * @param object An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); $this->_toolbar = $config->toolbar; }
/** * Constructor * * @param object An optional KConfig object with configuration options. */ public function __construct(KConfig $config) { parent::__construct($config); $this->_modules = KConfig::unbox($config->modules); $this->_force_cache = $config->force_cache; }
/** * Constructor. * * @param KObjectConfig $config Configuration options */ public function __construct(KObjectConfig $config) { parent::__construct($config); $this->_permission = $config->permission; }
/** * Constructor. * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); $this->_log = $config->log; }
/** * 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')); }
/** * 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')); }