本文整理汇总了PHP中Zikula_Form_View::formDie方法的典型用法代码示例。如果您正苦于以下问题:PHP Zikula_Form_View::formDie方法的具体用法?PHP Zikula_Form_View::formDie怎么用?PHP Zikula_Form_View::formDie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zikula_Form_View
的用法示例。
在下文中一共展示了Zikula_Form_View::formDie方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
/**
* 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)
{
// All member variables are fetched automatically before create (as strings)
// Here we afterwards load all special and non-string parameters
$this->inputName = array_key_exists('inputName', $params) ? $params['inputName'] : $this->id;
$this->textMode = array_key_exists('textMode', $params) ? $params['textMode'] : 'singleline';
$this->dataField = array_key_exists('dataField', $params) ? $params['dataField'] : $this->id;
$this->dataBased = array_key_exists('dataBased', $params) ? $params['dataBased'] : true;
if (array_key_exists('maxLength', $params)) {
$this->maxLength = $params['maxLength'];
} elseif ($this->maxLength == null && !in_array(strtolower($this->textMode), array('multiline', 'hidden'))) {
$view->formDie("Missing maxLength value in textInput plugin '{$this->id}'.");
}
if (array_key_exists('minLength', $params)) {
$this->minLength = $params['minLength'];
} else {
$this->minLength = 0;
}
}