/** * Create event handler. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param array &$params Parameters passed from the Smarty plugin function. * * @see Zikula_Form_AbstractPlugin * @return void */ public function create(Zikula_Form_View $view, &$params) { $params['maxLength'] = 11; /*$params['width'] = '8em';*/ // let parent plugin do the work in detail parent::create($view, $params); }
/** * Create event handler. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param array &$params Parameters passed from the Smarty plugin function. * * @see Zikula_Form_AbstractPlugin * @return void */ public function create(Zikula_Form_View $view, &$params) { $this->maxLength = 2000; $params['textMode'] = 'url'; parent::create($view, $params); $this->cssClass .= ' z-form-url'; }
function create(Zikula_Form_View $view, &$params) { $this->writable = array_key_exists('writable', $params) ? true : false; $this->removeSlash = array_key_exists('removeSlash', $params) ? true : false; $params['width'] = '6em'; parent::create($view, $params); }
/** * Create event handler. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param array &$params Parameters passed from the Smarty plugin function. * * @see Zikula_Form_AbstractPlugin * @return void */ function create(Zikula_Form_View $view, &$params) { $this->maxLength = 20; $params['width'] = '6em'; parent::create($view, $params); $this->regexValidationPattern = '/^\\s*[+-]?\\s*?[0-9]+\\s*$/'; $this->regexValidationMessage = __('Error! Invalid integer.'); }
/** * Create event handler. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param array &$params Parameters passed from the Smarty plugin function. * * @see Zikula_Form_AbstractPlugin * @return void */ function create(Zikula_Form_View $view, &$params) { $this->maxLength = 100; parent::create($view, $params); $this->cssClass .= ' z-form-email'; }
/** * Create event handler. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param array &$params Parameters passed from the Smarty plugin function. * * @see Zikula_Form_AbstractPlugin * @return void */ public function create(Zikula_Form_View $view, &$params) { // Check if precision is provided, is a number, is an integer (even if its data type is a string), and is non-negative. if (isset($params['precision']) && is_numeric($params['precision']) && (int) $params['precision'] == $params['precision'] && $params['precision'] >= 0) { // TODO - should we check if it is a non-negative integer separately so that we can throw or log an error or warning? $this->precision = (int) $params['precision']; } else { $this->precision = 2; } $this->maxLength = 30; $params['width'] = '6em'; parent::create($view, $params); }
/** * Create event handler. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param array &$params Parameters passed from the Smarty plugin function. * * @see Zikula_Form_AbstractPlugin * @return void */ public function create(Zikula_Form_View $view, &$params) { $this->maxLength = 20; $params['width'] = '6em'; $params['textMode'] = 'number'; if (isset($this->minValue)) { $this->attributes['min'] = $this->minValue; } if (isset($this->maxValue)) { $this->attributes['max'] = $this->maxValue; } parent::create($view, $params); $this->regexValidationPattern = '/^\\s*[+-]?\\s*?[0-9]+\\s*$/'; $this->regexValidationMessage = __('Error! Invalid integer.'); }
/** * Create event handler. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param array &$params Parameters passed from the Smarty plugin function. * * @see Zikula_Form_AbstractPlugin * @return void */ public function create(Zikula_Form_View $view, &$params) { $this->includeTime = array_key_exists('includeTime', $params) ? $params['includeTime'] : 0; $this->daFormat = array_key_exists('daFormat', $params) ? $params['daFormat'] : ($this->includeTime ? __('%A, %B %d, %Y - %I:%M %p') : __('%A, %B %d, %Y')); $this->ifFormat = array_key_exists('ifFormat', $params) ? $params['ifFormat'] : ($this->includeTime ? __('%Y-%m-%d %H:%M') : __('%Y-%m-%d')); $this->defaultValue = array_key_exists('defaultValue', $params) ? $params['defaultValue'] : null; $this->initDate = array_key_exists('initDate', $params) ? $params['initDate'] : 0; $this->useSelectionMode = array_key_exists('useSelectionMode', $params) ? $params['useSelectionMode'] : 0; $this->maxLength = $this->includeTime ? 19 : 12; $params['width'] = $this->includeTime ? '10em' : '8em'; parent::create($view, $params); $this->cssClass .= ' z-form-date'; }