public function __construct(KObjectConfig $config) { parent::__construct($config); $this->addCommandCallback('after.save', '_setRedirect'); $this->addCommandCallback('after.apply', '_setRedirect'); $this->addCommandCallback('after.cancel', '_setRedirect'); }
public function __construct(KObjectConfig $config) { parent::__construct($config); $this->addCommandCallback('after.save', '_setRedirect'); $this->addCommandCallback('after.apply', '_setRedirect'); $this->addCommandCallback('after.cancel', '_setRedirect'); $this->addCommandCallback('before.render', '_checkThumbnailsSupport'); }
public function __call($method, $args) { if (substr($method, 0, 14) === 'prepareGateway') { if (!in_array($method, $this->getMethods())) { $method = 'prepareGatewayDefault'; } } return parent::__call($method, $args); }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'formats' => array('json'), 'behaviors' => array('thumbnailable', 'findable', 'filterable') )); parent::_initialize($config); }
public function getRequest() { $request = parent::getRequest(); // "e_name" is needed to be compatible with com_content of Joomla if ($request->query->e_name) { $request->query->editor = $request->query->e_name; } return $request; }
protected function _initialize(KObjectConfig $config) { $config->append(array( 'formats' => array('json', 'rss'), 'model' => 'com://site/docman.model.documents' )); 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('model' => 'com:koowa.model.users', 'view' => 'com:koowa.view.users.json')); parent::_initialize($config); }
protected function _initialize(KObjectConfig $config) { $config->append(array('behaviors' => array('fieldable'))); parent::_initialize($config); }
/** * Redirects batch edits to documents view. * * @param KControllerContextInterface $context * @return KObjectInterface */ public function getReferrer(KControllerContextInterface $context) { $referrer = parent::getReferrer($context); if ($referrer instanceof KHttpUrl) { $query = $referrer->query; $is_docman = isset($query['option']) && $query['option'] == 'com_docman'; $is_files = isset($query['view']) && $query['view'] == 'files'; $is_form = isset($query['layout']) && $query['layout'] == 'form'; if ($is_docman && $is_files && $is_form) { $referrer = $this->getObject('lib:http.url', array('url' => $this->getView()->getRoute(array('view' => 'documents')))); } } return $referrer; }
protected function _loadTranslations(KControllerContextInterface $context) { parent::_loadTranslations($context); $this->getObject('translator')->load('com://admin/sales'); }
/** * Initializes the default configuration 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('formats' => array('csv'))); parent::_initialize($config); }
public function _initialize(KObjectConfig $config) { $config->append(array('behaviors' => array('com://admin/translations.controller.behavior.translatable'))); parent::_initialize($config); }
/** * Overriden for auto-aliasing views when the controller is extended. */ public function setView($view) { $view = parent::setView($view); if ($view instanceof KObjectIdentifierInterface && $view->getPackage() !== 'files') { $manager = $this->getObject('manager'); if (!$manager->getClass($view, false)) { $identifier = $view->toArray(); $identifier['package'] = 'files'; unset($identifier['domain']); $manager->registerAlias($identifier, $view); } } return $view; }