コード例 #1
0
ファイル: Collection.php プロジェクト: rocketpastsix/UForm
 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");
 }
コード例 #2
0
ファイル: Group.php プロジェクト: rocketpastsix/UForm
 /**
  * @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");
 }
コード例 #3
0
ファイル: Group.php プロジェクト: gsouf/uform
 /**
  * @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');
 }