/** * @constuctor * * @param string $absolutename absolutename * @param string $name name * @param array $configuration configuration * @param \Ameos\AmeosForm\Form $form form */ public function __construct($absolutename, $name, $configuration = [], $form) { parent::__construct($absolutename, $name, $configuration, $form); if (!isset($this->configuration['optionValueField'])) { $this->configuration['optionValueField'] = 'uid'; } }
public function __construct($id = null, array $params = null) { $this->_setParameterObjects(array('select_max_values' => new Parameter(Parameter::INTEGER, 100), 'display' => new Parameter(Parameter::STRING), 'sorting' => new Parameter(Parameter::MULTIPLE))); parent::__construct($id, $params); if (isset($this->_has['maxval']) && $this->_has['maxval'] != 0) { // maxval has no meaning within this field so we use it to define boundary value between select and autocompleter $this->setParameter('select_max_values', $this->_has['maxval']); } }
public function __construct(array $config, array $params) { parent::__construct($config, $params); $this->formElement = new \Zend_Form_Element_Select('enseignant_code'); $dic = $this->getContainer(); $enseignantAnnee = $dic->get('entitymanager.enseignantannee'); $this->formElement->setLabel('enseignant'); $this->formElement->setMultiOptions(array(null => '-- votre choix --') + $enseignantAnnee->getMultiOptions($this->getFiltre($params))); }
/** * @constuctor * * @param string $absolutename absolutename * @param string $name name * @param array $configuration configuration * @param \Ameos\AmeosForm\Form $form form */ public function __construct($absolutename, $name, $configuration = [], $form) { parent::__construct($absolutename, $name, $configuration, $form); if (!isset($this->configuration['format-output'])) { $this->configuration['format-output'] = 'timestamp'; } if (!isset($this->configuration['format-display'])) { $this->configuration['format-display'] = 'dmy'; } $this->yearMinimumLimit = isset($this->configuration['year-minimum-limit']) ? (int) $this->configuration['year-minimum-limit'] : 1900; $this->yearMaximumLimit = isset($this->configuration['year-maximum-limit']) ? (int) $this->configuration['year-maximum-limit'] : date('Y') + 20; }
public function __construct(array $config, array $params) { parent::__construct($config, $params); $current = date('Y'); $multiOptions = array(); for ($i = $current; $i > 2014; $i--) { $multiOptions[$i] = $i; } $this->formElement = new \Zend_Form_Element_Select('annee'); $this->formElement->setLabel('année civile'); $this->formElement->setMultiOptions($multiOptions); }
/** * @constuctor * * @param string $absolutename absolutename * @param string $name name * @param array $configuration configuration * @param \Ameos\AmeosForm\Form $form form */ public function __construct($absolutename, $name, $configuration = [], $form) { parent::__construct($absolutename, $name, $configuration, $form); $this->configuration['minutestep'] = isset($this->configuration['minutestep']) ? $this->configuration['minutestep'] : 1; }