public function __construct($name, Element $elementDefinition, $min = 1, $max = -1) { parent::__construct($name); $this->elementDefinition = $elementDefinition; $this->min = $min; $this->max = $max; $this->elementDefinition->setName(null); $this->addSemanticType("collection"); }
/** * @param null|string $name name of the group. A group name can be null to allow transparent grouping * @param Element|Element[] $elements one or many elements to add to the group */ public function __construct($name = null, $elements = null) { parent::__construct($name); if (is_array($elements)) { foreach ($elements as $el) { $this->addElement($el); } } elseif (is_object($elements)) { $this->addElement($elements); } $this->addSemanticType("group"); }
/** * @param null|string $name name of the group. A group name can be null to allow transparent grouping * @param Element|Element[] $elements one or many elements to add to the group */ public function __construct($name = null) { parent::__construct($name); $this->addSemanticType('group'); }