public function __construct(array $allowedClassesInstances, $label = null, $flags = null, $element_id = null) { foreach ($allowedClassesInstances as $e) { if (is_string($e) && class_exists($e)) { $this->allowedClassesInstances[$e] = new $e(); } else { if ($e instanceof Element) { $this->allowedClassesInstances[$e->getClass()] = $e; } else { // error elements must be an array of valid classes names or Elements } } } parent::__construct($label, $flags, $element_id); }
public function __construct(array $allowedClassesInstances, $label = null, $flags = null, $element_id = null) { if (is_string($allowedClassesInstances[0])) { foreach ($allowedClassesInstances as $class) { $this->allowedClassesInstances[$class] = new $class(); } } else { if ($allowedClassesInstances[0] instanceof \SimplOn\Elements\Element) { foreach ($allowedClassesInstances as $classInstance) { $this->allowedClassesInstances[$classInstance->getClass()] = $classInstance; } } else { // error elements must be an array of valid classes names or Elements } } parent::__construct($label, $flags, $element_id); }
public function __construct(\SimplOn\Elements\Element $element, $label = null, $flags = null, $element_id = null) { $this->element($element); parent::__construct($label, $flags, $element_id); }
public function __construct(Element $element, $label = null, $flags = null, $element_id = null, $column = null) { $this->column = $column; $this->element($element); parent::__construct($label, $flags, $element_id); }