Esempio n. 1
0
 /**
  * Добавляет  компонент  в строку-контейнер
  * переопределяет  родительский  метод
  * @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;
 }
Esempio n. 2
0
 /**
  * Добавляет  компонент  к  списку  дочерних
  * Иерархия  компонентов  должна   строго соответствовать  иерархии
  * вложеных  тэгов (с аттрибутами  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;
 }
Esempio n. 3
0
 /**
  * Конструктор
  * @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);
     }
 }
Esempio n. 4
0
 /**
  * Конструктор
  *
  * @param  string ID номер  компонента
  * @param  TreeNode Корневой узел
  */
 public function __construct($id)
 {
     HtmlComponent::__construct($id);
     //$this->addRoot($root);
     //$root->setActive(true);
     //$root->setSelected(true);
 }
Esempio n. 5
0
 /**
  * Конструктор
  * @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);
 }
Esempio n. 6
0
 public function __construct($id)
 {
     parent::__construct($id);
     $this->setAttribute("href", "javascript:void(0);");
 }
Esempio n. 7
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();
 }
Esempio n. 8
0
 /**
  * Конструктор
  * @param  string ID компонента
  * @param  string Разделитель  между ссылками
  */
 public function __construct($id, $delimiter = ' ')
 {
     parent::__construct($id);
     $this->delimiter = $delimiter;
 }
Esempio n. 9
0
 /**
  * Конструктор
  * @param string ID
  * @param  DataList Объект  использующий  paginator
  */
 public function __construct($id, \Zippy\Html\DataList\AbstractList $datalist)
 {
     parent::__construct($id);
     $this->datalist = $datalist;
 }