public function addFormElementDefinition(FormElementDefinition $definition)
 {
     if ($definition->getName() != '') {
         $this->namedFields[$definition->getName()] = $definition;
     }
     $this->fields[] = $definition;
     $this->properties = null;
     $this->mandatoryProperties = null;
     $this->uniqueProperties = null;
     $this->protectedProperties = null;
 }
 public function __construct($name, $params = array(), $lists = array())
 {
     if (!isset($params[0])) {
         throw new CMDLParserException('Missing mandatory parameter contenttype for form element reference.', CMDLParserException::CMDL_MISSING_MANDATORY_PARAM);
     }
     $contentTypeName = $params[0];
     if (strpos($contentTypeName, '.') !== false) {
         $split = explode('.', $contentTypeName);
         $this->setRepositoryName($split[0]);
         $contentTypeName = $split[1];
     }
     $this->setContentType($contentTypeName);
     if (isset($params[1])) {
         $this->setType($params[1]);
     }
     if (isset($params[2])) {
         $this->setWorkspace($params[2]);
     }
     if (isset($params[3])) {
         $this->setOrder($params[3]);
     }
     if (isset($params[4])) {
         $this->setLanguage($params[4]);
     }
     if (isset($params[5])) {
         $this->setTimeshift($params[5]);
     }
     parent::__construct($name, $params, $lists);
 }
 public function __construct($name, $params = array(), $lists = array())
 {
     if (isset($params[0])) {
         $this->setUrl($params[0]);
     }
     if (isset($params[1])) {
         $this->setContentType($params[1]);
     }
     if (isset($params[2])) {
         $this->setType($params[2]);
     }
     if (isset($params[3])) {
         $this->setWorkspace($params[3]);
     }
     if (isset($params[4])) {
         $this->setOrder($params[4]);
     }
     if (isset($params[5])) {
         $this->setLanguage($params[5]);
     }
     if (isset($params[6])) {
         $this->setTimeshift($params[6]);
     }
     // skip constructor of form element reference, since it has less parameters and therefore a slightly different parameter order
     FormElementDefinition::__construct($name, $params, $lists);
 }
 public function __construct($name, $params = array(), $lists = array())
 {
     if (isset($params[0])) {
         $this->setType($params[0]);
     }
     parent::__construct($name, $params, $lists);
 }
 public function __construct($name, $params, $lists)
 {
     if (isset($lists[0])) {
         $this->setColumnHeadings($lists[0]);
     } else {
         throw new CMDLParserException('Missing mandatory list "headings" of form element ' . $this->elementType, CMDLParserException::CMDL_MISSING_MANDATORY_PARAM);
     }
     if (isset($lists[1])) {
         $this->setWidths($lists[1]);
     }
     parent::__construct($name, $params, $lists);
 }
 public function __construct($name, $params = array(), $lists = array())
 {
     if (isset($params[0])) {
         $this->setMin($params[0]);
     }
     if (isset($params[1])) {
         $this->setMax($params[1]);
     }
     if (isset($params[2])) {
         $this->setStep($params[2]);
     }
     if ($this->min === null) {
         throw new CMDLParserException('Missing mandatory parameter min for form element range.', CMDLParserException::CMDL_MISSING_MANDATORY_PARAM);
     }
     if ($this->max === null) {
         throw new CMDLParserException('Missing mandatory parameter max for form element range.', CMDLParserException::CMDL_MISSING_MANDATORY_PARAM);
     }
     parent::__construct($name, $params, $lists);
 }
 public function __construct($name, $params, $lists)
 {
     $type = array_shift($params);
     $this->setType($type);
     parent::__construct($name, $params, $lists);
 }
 public function render($layout)
 {
     if ($this->definition->getName()) {
         return $this->twig->render('formelement-default.twig', $this->vars);
     }
 }