/** * Method to get the data to be passed to the layout for rendering. * * @return array * * @since 3.7 */ protected function getLayoutData() { $data = parent::getLayoutData(); // Initialize some field attributes. $maxLength = !empty($this->maxLength) ? ' maxlength="' . $this->maxLength . '"' : ''; // Note that the input type "url" is suitable only for external URLs, so if internal URLs are allowed // we have to use the input type "text" instead. $inputType = $this->element['relative'] ? 'type="text"' : 'type="url"'; $extraData = array('maxLength' => $maxLength, 'inputType' => $inputType); return array_merge($data, $extraData); }
/** * Method to get the data to be passed to the layout for rendering. * * @return array * * @since 3.5 */ protected function getLayoutData() { $data = parent::getLayoutData(); $extraData = array('maxLength' => $this->maxLength, 'multiple' => $this->multiple); return array_merge($data, $extraData); }