本文整理汇总了PHP中Zend_Form_Element_Text::setAllowEmpty方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Text::setAllowEmpty方法的具体用法?PHP Zend_Form_Element_Text::setAllowEmpty怎么用?PHP Zend_Form_Element_Text::setAllowEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Text
的用法示例。
在下文中一共展示了Zend_Form_Element_Text::setAllowEmpty方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initAttributeValue
public function _initAttributeValue()
{
$element = new Zend_Form_Element_Text('attribute_value');
$element->setRequired(true);
$element->setAllowEmpty(false);
return $this->addElement($element);
}
示例2: _initProperty
/**
* @return EngineBlock_Form_GroupProviderGroupMemberFilter
*/
public function _initProperty()
{
$element = new Zend_Form_Element_Text('group_member_filter_property');
$element->setRequired(TRUE);
$element->setAllowEmpty(false);
return $this->addElement($element);
}
示例3: _initLogoUrl
public function _initLogoUrl()
{
$element = new Zend_Form_Element_Text('logoUrl');
$element->setRequired(TRUE);
$element->setAllowEmpty(false);
return $this->addElement($element);
}
示例4: _initIdpId
/**
* @return EngineBlock_Form_VirtualOrganisationIdp
*/
public function _initIdpId()
{
$element = new Zend_Form_Element_Text('idp_id');
$element->setRequired(TRUE);
$element->setAllowEmpty(false);
return $this->addElement($element);
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->setAttrib('id', 'feedback_form');
$this->setAction("/index/feedback");
/* Name. */
$name = new Zend_Form_Element_Text('name');
$name->setLabel('Name:')->setRequired(true)->addValidator('NotEmpty')->setAttrib('class', 'validate[required]')->setErrorMessages(array('You must supply your name.'))->setDecorators(Sahara_Decorator_Table::$ELEMENT);
$this->addElement($name);
/* Email. */
$email = new Zend_Form_Element_Text('email');
$email->setLabel('Email:')->setRequired(true)->addValidator('EmailAddress')->setAttrib('class', 'validate[required,custom[email]]')->setErrorMessages(array('You must supply your contact email address.'))->setDecorators(Sahara_Decorator_Table::$ELEMENT);
$this->addElement($email);
/* Type. */
$type = new Zend_Form_Element_Select('type');
$type->setLabel('Type:')->setMultiOptions(array('Help Request' => 'Help Request', 'General comment' => 'General comment', 'Fault report' => 'Fault report', 'Feature request' => 'Feature request'))->setDecorators(Sahara_Decorator_Table::$ELEMENT);
$this->addElement($type);
/* Purpose of use. */
$purpose = new Zend_Form_Element_Text('purpose');
$purpose->setLabel('Purpose:')->setRequired(true)->setAttrib('class', 'validate[required]')->setErrorMessages(array('You must supply the purpose of your Remote Laboratory use.'))->setDecorators(Sahara_Decorator_Table::$ELEMENT);
$this->addElement($purpose);
/* Feedback. */
$feedback = new Zend_Form_Element_Textarea('feedback');
$feedback->setLabel('Feedback:')->setRequired(true)->setAttrib('class', 'validate[required]')->setErrorMessages(array('You must supply some feedback!'))->setAttrib('rows', '10')->setAttrib('cols', '55')->setDecorators(Sahara_Decorator_Table::$ELEMENT);
$this->addElement($feedback);
/** Bots fuck off! */
$bots = new Zend_Form_Element_Text('botsfu');
$bots->setAllowEmpty(true)->setRequired(false)->setAttrib('id', 'botsfu')->setDecorators(Sahara_Decorator_Table::$ELEMENT);
$this->addElement($bots);
$this->addDisplayGroup(array('name', 'email', 'type', 'purpose', 'feedback', 'botsfu'), 'feedback_form');
$dg = $this->getDisplayGroup('feedback_form');
$dg->setDecorators(Sahara_Decorator_Table::$DISPLAYGROUP);
}
示例6: _initClassName
/**
* @return EngineBlock_Form_GroupProviderPrecondition
*/
public function _initClassName()
{
$element = new Zend_Form_Element_Text('precondition_class_name');
$element->setRequired(TRUE);
$element->setAllowEmpty(false);
return $this->addElement($element);
}
示例7: _initScreenShotUrl
/**
* @return Portal_Form_GadgetDefinition
*/
public function _initScreenShotUrl()
{
$element = new Zend_Form_Element_Text('screenShotUrl');
$element->setRequired(TRUE);
$element->setAllowEmpty(FALSE);
return $this->addElement($element);
}
示例8: _initVOId
/**
* @return EngineBlock_Form_VirtualOrganisation
*/
public function _initVOId()
{
$element = new Zend_Form_Element_Text('vo_id');
$element->setRequired(TRUE);
$element->setAllowEmpty(false);
$validator = new Zend_Validate_Regex("/^[a-zA-Z0-9\\-_]+\$/");
$element->addValidator($validator);
$element->addErrorMessage("Illegal characters detected.");
return $this->addElement($element);
}
示例9:
function __construct()
{
parent::__construct();
$this->setMethod('POST');
$this->setAction('/cashout/admin/minimum');
$amount = new Zend_Form_Element_Text('amount');
$submit = new Zend_Form_Element_Submit('submit');
$amount->addValidator(new Fund_Models_Forms_Validators_Currency());
$amount->setAllowEmpty(false);
$amount->setLabel('Amount');
$submit->setLabel('Set Minimum');
$this->addElements(array($amount, $submit));
}
示例10: addCheckFields
/**
* Add user defined checkfields
*
* @return void
*/
protected function addCheckFields()
{
$check = 1;
foreach ($this->checkFields as $label => &$value) {
if ($value instanceof \Zend_Form_Element) {
$element = $value;
} else {
if ($value) {
$element = new \Zend_Form_Element_Text('check_' . $check);
$element->setAllowEmpty(false);
$element->setLabel($label);
$validator = new \Zend_Validate_Identical($value);
$validator->setMessage(sprintf($this->_('%s is not correct.'), $label), \Zend_Validate_Identical::NOT_SAME);
$element->addValidator($validator);
$value = $element;
$check++;
} else {
// Nothing to check for
unset($this->checkFields[$label]);
continue;
}
}
$this->addElement($element);
}
}
示例11: _initEmailSubject
/**
* @return EngineBlock_Form_EmailConfiguration
*/
public function _initEmailSubject()
{
$element = new Zend_Form_Element_Text('email_subject');
$element->setAllowEmpty(false);
return $this->addElement($element);
}
示例12: _initField
/**
* @return Portal_Form_TextContent
*/
public function _initField()
{
$element = new Zend_Form_Element_Text('field');
$element->setAllowEmpty(false);
return $this->addElement($element);
}