/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { if (!isset($config->icon)) { $config->icon = 'icon-32-export'; } parent::__construct($config); }
/** * Initializes the options for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param array Options * @return array Options */ protected function _initialize(KConfig $options) { $name = $this->getName(); $this->attribs = new KObject(); $attribs = array('class' => 'toolbar toolbar-form-validate type:\'' . $this->_method . '\'', 'href' => '#'); if (isset($options->attribs)) { $attribs = array_merge($attribs, $options->attribs); } $this->attribs->set($attribs); $options->append(array('parent' => null, 'icon' => 'icon-32-' . $name, 'id' => $name, 'text' => ucfirst($name), 'method' => 'get', 'identifier' => null)); parent::_initialize($options); }
/** * Constructor * * @param object An optional KConfig object with configuration options */ public function __construct(KConfig $config) { parent::__construct($config); $this->setMethod('post'); }