/** * Initializes the configuration for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param array Configuration settings */ protected function _initialize(KConfig $config) { $config->append(array( 'layout' => KInflector::isSingular($this->getName()) ? 'form' : 'default' )); parent::_initialize($config); }
/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); //Add alias filter for editor helper $this->getTemplate()->getFilter('alias')->append(array( '@editor(' => '$this->renderHelper(\'com://admin/default.template.helper.editor.display\', ') ); }
/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); //Add alias filter for editor helper KFactory::get($this->getTemplate())->getFilter('alias')->append(array('@editor(' => '$this->loadHelper(\'admin::com.default.template.helper.editor.display\', ')); //Add the template override path $parts = $this->_identifier->path; array_shift($parts); if (count($parts) > 1) { $path = KInflector::pluralize(array_shift($parts)); $path .= count($parts) ? '/' . implode('/', $parts) : ''; $path .= DS . strtolower($this->getName()); } else { $path = strtolower($this->getName()); } $template = KFactory::get('lib.joomla.application')->getTemplate(); $path = JPATH_THEMES . '/' . $template . '/' . 'html/com_' . $this->_identifier->package . DS . $path; KFactory::get($this->getTemplate())->addPath($path); }