/** * Render a custom element. * * @param string $name The name of the element * @param string $value The vlaue of the element * @param xmlElement $node The node xml element * @param string $control_name The control name * * @see JElement * * @return string */ public function fetchElement($name, $value, &$node, $control_name) { $data = pick(KConfig::unbox($this->_parent->template_data), array()); $data['name'] = $name; $data['value'] = $value; $data['node'] = $node; $data['control_name'] = $control_name; return (string) $this->_template->loadString($node->data(), $data); }
/** * 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) { $config->append(array('cache' => true, 'cache_key' => (string) $this->getIdentifier())); parent::_initialize($config); }