本文整理汇总了PHP中Zend_Dojo_Form_Element_TextBox::setLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Dojo_Form_Element_TextBox::setLabel方法的具体用法?PHP Zend_Dojo_Form_Element_TextBox::setLabel怎么用?PHP Zend_Dojo_Form_Element_TextBox::setLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Dojo_Form_Element_TextBox
的用法示例。
在下文中一共展示了Zend_Dojo_Form_Element_TextBox::setLabel方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$router = new Shared_Controller_Router();
$this->setAction($router->assemble(array(), 'login'));
$this->setMethod('post');
// email
$email = new Zend_Dojo_Form_Element_TextBox('email');
$email->setLabel(__('Email'));
$email->setRequired(true);
$this->addElement($email);
// password
$password = new Zend_Dojo_Form_Element_PasswordTextBox('password');
$password->setLabel(__('Password'));
$password->setRequired(true);
$this->addElement($password);
// remember
$remember = new Zend_Dojo_Form_Element_CheckBox('remember');
$remember->setLabel(__('Remember me on this computer'));
$remember->setCheckedValue('yes');
$remember->setUncheckedValue('no');
$remember->setChecked(true);
$this->addElement($remember);
// submit
$submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
$submit->setLabel(__('Submit'));
$this->addElement($submit);
}
示例2: __construct
public function __construct()
{
parent::__construct();
$router = new Shared_Controller_Router();
$this->setAction($router->assemble(array(), 'application-new'));
$this->setMethod('post');
// name
$name = new Zend_Dojo_Form_Element_TextBox('name');
$name->setLabel(__('Name'));
$name->setRequired(true);
$this->addElement($name);
// description
$description = new Zend_Dojo_Form_Element_Textarea('description');
$description->setLabel(__('Description'));
$description->setAttrib('rows', '5');
$description->setAttrib('cols', '60');
$this->addElement($description);
// url
$url = new Zend_Dojo_Form_Element_TextBox('url');
$url->setLabel(__('URL'));
$url->setRequired(true);
$this->addElement($url);
// privacy
$privacy = new Zend_Dojo_Form_Element_ComboBox('privacy');
$privacy->setLabel(__('Privacy'));
$privacy->setRequired(true);
$privacy->addMultiOptions(array('private' => __('Private: users cannot follow this application'), 'public' => __('Public: users can follow this application')));
$privacy->setValue('public');
$this->addElement($privacy);
// submit
$submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
$submit->setLabel(__('Submit'));
$this->addElement($submit);
}
示例3: init
public function init()
{
// Título
$titulo = new Zend_Dojo_Form_Element_TextBox('titulo');
$titulo->setLabel('Título')->setDescription('Nome Completo do Artigo')->setRequired(true)->setAllowEmpty(false)->addValidator(new Zend_Validate_StringLength(1, 100))->addFilter(new Zend_Filter_Alnum(true))->addFilter(new Zend_Filter_StringTrim())->setMaxLength(100);
$this->addElement($titulo);
// Botão de Envio
$submit = new Local_Form_Element_SubmitButton('submit');
$this->addElement($submit);
}
示例4: addFields
/**
* Inclusão de Elementos
* @param array $fields Conjunto de Identificadores e Conteúdo
* @return Application_Form_Referencia Próprio Objeto para Encadeamento
*/
public function addFields(array $fields)
{
$form = new Zend_Form_SubForm();
foreach ($fields as $identifier => $content) {
$element = new Zend_Dojo_Form_Element_TextBox($identifier);
$element->setLabel($content)->setRequired(true);
$form->addElement($element);
}
$this->addSubForm($form, 'conteudo');
return $this;
}
示例5: init
public function init()
{
// Identidade do Usuário
$identidade = new Zend_Dojo_Form_Element_TextBox('identidade');
$identidade->setLabel('Nome do Usuário')->setRequired(true);
$this->addElement($identidade);
// Credenciais
$credencial = new Zend_Dojo_Form_Element_PasswordTextBox('credencial');
$credencial->setLabel('Senha');
$this->addElement($credencial);
// Botão de Envio
$submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
$submit->setLabel('Entrar')->setIgnore(true);
$this->addElement($submit);
}
示例6: init
public function init()
{
// Identidade
$identidade = new Zend_Dojo_Form_Element_TextBox('identidade');
$identidade->setLabel('Usuário')->setDescription('Nome do Usuário para Acessar o Sistema');
$this->addElement($identidade);
// Credenciais
$credencial = new Zend_Dojo_Form_Element_PasswordTextBox('credencial');
$credencial->setLabel('Senha')->setDescription('Credenciais para Autenticação')->addFilter(new Zend_Filter_Null());
$this->addElement($credencial);
// Autor
$autor = new Application_Form_Autor();
$autor->removeElement('submit');
$this->addSubForm($autor, 'autor');
// Botão de Envio
$submit = new Local_Form_Element_SubmitButton('submit');
$this->addElement($submit);
}
示例7: init
public function init()
{
// Nome
$nome = new Zend_Dojo_Form_Element_TextBox('nome');
$nome->setLabel('Nome')->setDescription('Nome do Autor')->addValidator(new Zend_Validate_StringLength(0, 100))->addValidator(new Zend_Validate_Alpha(true))->addFilter(new Zend_Filter_StringTrim())->setRequired(true);
$this->addElement($nome);
// Email
$tbAutor = new Application_Model_DbTable_Autor();
$options = array('table' => $tbAutor->info(Zend_Db_Table::NAME), 'schema' => $tbAutor->info(Zend_Db_Table::SCHEMA), 'field' => 'email');
$email = new Zend_Dojo_Form_Element_TextBox('email');
$email->setLabel('Email')->setDescription('Email para Contato')->addValidator(new Zend_Validate_EmailAddress())->addValidator(new Zend_Validate_StringLength(1, 100))->addValidator(new Local_Validate_Db_NoRecordExists($options))->addFilter(new Zend_Filter_StringTrim())->setRequired(true);
$this->addElement($email);
// Instituição
$instituicao = new Application_Form_Instituicao();
$instituicao->removeElement('submit');
$this->addSubForm($instituicao, 'instituicao');
// Botão de Envio
$submit = new Local_Form_Element_SubmitButton('submit');
$this->addElement($submit);
}
示例8: init
public function init()
{
// Identificador
$identificador = new Application_Form_Element_Label('identificador');
$identificador->setLabel('Identificador')->setDescription('Texto Único para Referência Cruzada');
$this->addElement($identificador);
// Legenda da Imagem
$legenda = new Zend_Dojo_Form_Element_TextBox('legenda');
$legenda->setLabel('Legenda')->setDescription('Texto Exibido Abaixo da Figura')->addValidator(new Zend_Validate_StringLength(0, 100))->addFilter(new Zend_Filter_StringTrim())->setTrim(true)->setMaxLength(100);
$this->addElement($legenda);
// Extensões Habilitadas
$extension = array('jpg', 'gif', 'png', 'case' => 'sensitive');
// Arquivo
$arquivo = new Zend_Form_Element_File('arquivo');
$arquivo->addValidator(new Zend_Validate_File_Count(1))->addValidator(new Zend_Validate_File_Extension($extension))->setDestination(APPLICATION_PATH . '/../temp')->setRequired(true)->setMaxFileSize(1024 * 500)->setLabel('Imagem para Exibição')->setDescription('Arquivo Correspondente da Imagem');
$this->addElement($arquivo);
// Botão de Envio
$submit = new Local_Form_Element_SubmitButton('submit');
$this->addElement($submit);
}
示例9: __construct
public function __construct()
{
parent::__construct();
$router = new Shared_Controller_Router();
$this->setAction($router->assemble(array(), 'register'));
$this->setMethod('post');
// email
$email = new Zend_Dojo_Form_Element_TextBox('email');
$email->setLabel(__('Email'));
$email->setRequired(true);
$this->addElement($email);
// password
$password = new Zend_Dojo_Form_Element_PasswordTextBox('password');
$password->setLabel(__('Password'));
$password->setRequired(true);
$this->addElement($password);
// submit
$submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
$submit->setLabel(__('Submit'));
$this->addElement($submit);
}
示例10: __construct
public function __construct($applicationId)
{
parent::__construct();
$router = new Shared_Controller_Router();
$this->setAction($router->assemble(array(), 'template-new') . '?applicationid=' . $applicationId);
$this->setMethod('post');
// name
$name = new Zend_Dojo_Form_Element_TextBox('name');
$name->setLabel(__('Name'));
$name->setRequired(true);
$this->addElement($name);
// body
$body = new Zend_Dojo_Form_Element_Textarea('body');
$body->setLabel(__('Body'));
$body->setRequired(true);
$body->setAttrib('rows', '5');
$body->setAttrib('cols', '60');
$body->setDescription(__('HTML: You may only use the <a> tag.') . '<br />' . __('Tokens: Tokens should be %-delimeted, e.g. %post_url%.'));
$body->getDecorator('Description')->setEscape(false);
$this->addElement($body);
// privacy
$privacy = new Zend_Dojo_Form_Element_ComboBox('privacy');
$privacy->setLabel(__('Privacy'));
$privacy->setRequired(true);
$privacy->addMultiOptions(array('private' => __('Private: users can follow this these events'), 'public' => __('Public: users cannot follow these events')));
$privacy->setValue('public');
$this->addElement($privacy);
// web hooks
$webhooks = new Zend_Dojo_Form_Element_CheckBox('web_hooks');
$webhooks->setLabel(__('Allow web hooks'));
$webhooks->setRequired(true);
$webhooks->setChecked(true);
$webhooks->setCheckedValue('yes');
$webhooks->setUncheckedValue('no');
$this->addElement($webhooks);
// submit
$submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
$submit->setLabel(__('Submit'));
$this->addElement($submit);
}