/** * 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) { $params = ''; if (is_readable($file = JPATH_THEMES . '/' . $this->getIdentifier()->package . '/params.ini')) { $params = file_get_contents($file); } $params = new JParameter($params); $config->append(array('mimetype' => 'text/html', 'params' => $params->toArray(), 'template_filters' => array('shorttag', 'html', 'alias'))); parent::_initialize($config); }
/** * Sets the * * @return string */ public function display() { //Get the view name $name = $this->getName(); //set the state data to the view $this->_data = array_merge($this->_state->toArray(), $this->_data); //Assign the data of the model to the view if ($items = $this->_state->getList()) { $this->_data[KInflector::pluralize($name)] = $items; $this->_data['items'] = $items; } if ($item = $this->_state->getItem()) { $this->_data[KInflector::singularize($name)] = $item; $this->_data['item'] = $item; } return parent::display(); }