예제 #1
0
파일: html.php 프로젝트: raeldc/com_learn
 /**
  * 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);
 }
예제 #2
0
파일: html.php 프로젝트: raeldc/com_learn
 /**
  * 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\', ')
     );
 }
예제 #3
0
 /**
  * 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);
 }