示例#1
0
文件: Input.php 项目: siriusphp/input
 /**
  *
  * @param string $name
  *            Name of the input element that will make it identifiable
  * @param array $specs
  *            Specification for the element (attributes, parents, etc)
  */
 public function __construct($name, $specs = array())
 {
     $specs = array_merge($this->getDefaultSpecs(), $specs);
     parent::__construct($name, $specs);
 }
示例#2
0
 /**
  * Make sure a Group type element is added to the children if the element has a group
  *
  * @param Element $element
  */
 protected function ensureGroupExists(Element $element)
 {
     if (!$element->getGroup() || $this->hasElement($element->getGroup())) {
         return;
     }
     $this->addElement($element->getGroup(), array(Specs::TYPE => 'group', Specs::POSITION => $element->getPosition()));
 }