Exemple #1
0
 /**
  * @param string $name
  * @param string $title
  *
  * @throws ArgumentTypeException
  */
 function __construct($name, $title = '')
 {
     $this->attrs = new NamedObjectList([KeyValuePair::getClass()]);
     $this->children = new NamedObjectList([Block::getClass(), AbstractField::getClass()]);
     parent::__construct($name);
     $this->title($title);
     $this->isValid = true;
     $this->templateName = self::DEFAULT_TEMPLATE;
 }
Exemple #2
0
 /**
  * KeyValuePair constructor.
  *
  * @param string $name
  * @param string $value
  * @param bool $canBeShort
  */
 public function __construct($name, $value = '', $canBeShort = false)
 {
     parent::__construct($name);
     $this->setValue($value);
     $this->setCanBeShort($canBeShort);
 }