/** * Добавляет компонент в строку-контейнер * переопределяет родительский метод * @param HtmlComponent добавляемый компонент */ public function add(HtmlComponent $component) { if (isset($this->components[$component->id]) || isset($this->components[$component->id . ":" . $this->number])) { // $id = substr($component->id,0,strpos($component->id,':')); // $pid = substr($this->id,0,strpos($this->id,':')); throw new ZE(sprintf(ERROR_DATAROW_COMPONENT_EXISTS, $component->id, $pid)); } $this->components[$component->id] = $component; $component->setOwner($this); return $component; }
/** * Добавляет компонент к списку дочерних * Иерархия компонентов должна строго соответствовать иерархии * вложеных тэгов (с аттрибутами zippy) в HTML шаблоне */ public function add(HtmlComponent $component) { if (isset($this->components[$component->id])) { throw new ZE(sprintf(ERROR_COMPONENT_ALREADY_EXISTS, $component->id, $this->id)); } if (property_exists($this, $component->id)) { $id = strlen($this->id) > 0 ? $this->id : get_class($this); throw new ZE(sprintf(ERROR_COMPONENT_AS_PROPERTY, $component->id, $id)); } $this->components[$component->id] = $component; $component->setOwner($this); $component->onAdded(); return $component; }
/** * Конструктор * @param string ID компонента * @param EventReceiver Объект с методом обработки события * @param string Имя метода-обработчика */ public function __construct($id, EventReceiver $receiver = null, $handler = null) { parent::__construct($id); if (is_object($receiver) && strlen($handler) > 0) { $this->setClickHandler($receiver, $handler); } }
/** * Конструктор * * @param string ID номер компонента * @param TreeNode Корневой узел */ public function __construct($id) { HtmlComponent::__construct($id); //$this->addRoot($root); //$root->setActive(true); //$root->setSelected(true); }
/** * Конструктор * @param string ID елемента * @param string Текстовое содержание */ public function __construct($id, $text = null, $html = false) { parent::__construct($id); $this->value = $text; $this->html = $html; // $this->setOption(OPTION_INSERT_HTML); }
public function __construct($id) { parent::__construct($id); $this->setAttribute("href", "javascript:void(0);"); }
/** * Конструктор * * @param mixed $id * @param mixed $refresh если true генерится код для обновления через AJAX * @return Captcha */ public function __construct($id, $refresh = true) { parent::__construct($id); $this->refresh = $refresh; $this->Refresh(); }
/** * Конструктор * @param string ID компонента * @param string Разделитель между ссылками */ public function __construct($id, $delimiter = ' ') { parent::__construct($id); $this->delimiter = $delimiter; }
/** * Конструктор * @param string ID * @param DataList Объект использующий paginator */ public function __construct($id, \Zippy\Html\DataList\AbstractList $datalist) { parent::__construct($id); $this->datalist = $datalist; }