示例#1
0
文件: Row.php 项目: vegas-cmf/forms
 public function __construct(Cloneable $cloneable)
 {
     $this->cloneable = $cloneable;
     $this->rowIndex = $cloneable->getRowIndex();
     foreach ($this->cloneable->getBaseElements() as $element) {
         $field = clone $element;
         $field->setName($this->getSingleFieldName($element));
         $this->set($element->getName(), $field);
     }
 }
示例#2
0
 private function prepareValidCloneableField()
 {
     $cloneable = new Cloneable('cloneable_field');
     $cloneable->setBaseElements([new Text('test1')]);
     $cloneable->addBaseElement(new Text('test2'));
     $cloneable->getDecorator()->setDI($this->di);
     return $cloneable;
 }