当前位置: 首页>>代码示例>>PHP>>正文


PHP File::setLabel方法代码示例

本文整理汇总了PHP中Zend\Form\Element\File::setLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP File::setLabel方法的具体用法?PHP File::setLabel怎么用?PHP File::setLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend\Form\Element\File的用法示例。


在下文中一共展示了File::setLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addElements

 public function addElements()
 {
     // File Input
     $file = new Element\File('image');
     $file->setLabel('Zdjęcia')->setAttribute('id', 'image-file')->setAttribute('multiple', true)->setAttribute('class', 'button round blue image-right');
     $this->add($file);
 }
开发者ID:mmatusik,项目名称:panel-rabatem,代码行数:7,代码来源:PhotoForm.php

示例2: addElements

 public function addElements()
 {
     $id = new Element\Text('id');
     $id->setLabel('ID')->setAttribute('class', 'form-control')->setAttribute('type', 'hidden');
     $this->add($id);
     $name = new Element\Text('name');
     $name->setLabel('catalog name')->setAttribute('class', 'form-control')->setAttribute('required', 'true')->setAttribute('onchange', 'get_alias();')->setAttribute('id', 'name');
     $this->add($name);
     $alias = new Element\Text('alias');
     $alias->setLabel('catalog alias')->setAttribute('required', 'true')->setAttribute('class', 'form-control')->setAttribute('id', 'alias');
     $this->add($alias);
     $description = new Element\Textarea('description');
     $description->setLabel('Description')->setAttribute('class', 'materialize-textarea form-control')->setAttribute('id', 'description');
     $this->add($description);
     $hot = new Element\Radio('hot');
     $hot->setLabel('Choice hot')->setValueOptions(array('0' => 'No Hot', '1' => 'Hot'))->setAttribute('id', 'hot')->setAttribute('class', 'radio_style');
     $this->add($hot);
     $new = new Element\Radio('new');
     $new->setLabel('Choice new')->setValueOptions(array('0' => 'No New', '1' => 'New'))->setAttribute('id', 'new')->setAttribute('class', 'radio_style');
     $this->add($new);
     $status = new Element\Radio('status');
     $status->setLabel('status');
     //->setAttribute('required', 'true')
     $status->setValueOptions(array('0' => 'Pause', '1' => 'Active'))->setAttribute('id', 'status')->setAttribute('class', 'radio_style');
     $this->add($status);
     $show_index = new Element\Radio('show_index');
     $show_index->setLabel('show_index');
     //->setAttribute('required', 'true')
     $show_index->setValueOptions(array('0' => 'No', '1' => 'Yes'))->setAttribute('id', 'show_index')->setAttribute('class', 'radio_style');
     $this->add($show_index);
     $img = new Element\File('img');
     $img->setLabel('file img (* not support .png , .gif)')->setAttribute('class', 'form-control')->setAttribute('type', 'file')->setAttribute('accept', '.jpg, .jpeg, .JPG, .JPEG')->setAttribute('id', 'img');
     $this->add($img);
 }
开发者ID:gstearmit,项目名称:EshopVegeTable,代码行数:34,代码来源:CatalogForm.php

示例3: addElements

 public function addElements()
 {
     // File Input
     $file = new Element\File('image-file');
     $file->setLabel('Avatar Image Upload')->setAttribute('id', 'image-file');
     $this->add($file);
 }
开发者ID:janicevn79,项目名称:zendbook,代码行数:7,代码来源:UploadForm.php

示例4: __construct

 public function __construct(EntityManager $objectManager)
 {
     parent::__construct('ligue');
     $this->setAttributes(array('method' => 'post', 'id' => 'auth', 'role' => 'form'));
     $this->setInputFilter(new LigueFilter($objectManager));
     $this->setHydrator(new DoctrineObject($objectManager));
     // Id
     $id = new Hidden('id');
     $this->add($id);
     // Nom
     $nom = new Text('nom');
     $nom->setLabel('Nom')->setLabelAttributes(array('class', 'control-label'));
     $nom->setAttributes(array('id' => 'nom', 'class' => 'form-control', 'placeholder' => 'Nom', 'required' => true));
     $this->add($nom);
     // Image
     $image = new File('image');
     $image->setLabel('Image')->setLabelAttributes(array('class', 'control-label'));
     $image->setAttributes(array('id' => 'image', 'class' => 'form-control', 'placeholder' => 'Image'));
     $this->add($image);
     // Date début
     $dateDebut = new Text('dateDebut');
     $dateDebut->setLabel('Début de la ligue')->setLabelAttributes(array('class', 'control-label'));
     $dateDebut->setAttributes(array('id' => 'dateDebut', 'class' => 'form-control'));
     //$this->add($dateDebut);
     // Date fin
     $dateFin = new Text('dateFin');
     $dateFin->setLabel('Fin de la ligue')->setLabelAttributes(array('class', 'control-label'));
     $dateFin->setAttributes(array('id' => 'dateFin', 'class' => 'form-control'));
     //$this->add($dateFin);
     // Submit
     $submit = new Submit('submit');
     $submit->setValue('Enregistrer');
     $submit->setAttributes(array('class' => 'btn btn-primary'));
     $this->add($submit);
 }
开发者ID:baptcomet,项目名称:weprono,代码行数:35,代码来源:LigueForm.php

示例5: __construct

 public function __construct(EntityManager $entityManager)
 {
     parent::__construct();
     $this->entityManager = $entityManager;
     $this->setAttributes(array("method" => "post", "enctype" => "multipart/form-data", "class" => "form"));
     $this->setInputFilter(new HomeBannersFilters());
     // Campo de titulo
     $titulo = new Text('titulo');
     $titulo->setLabel("* Título")->setAttributes(array("maxLength" => "400", "class" => "form-control", "required" => "required"));
     // Campo tipo de midia
     $tipo = new Radio('tipo_banner');
     $tipo->setLabel('Tipo de mídia');
     $tipo->setValueOptions(array('IMAGEM' => 'Imagem', 'VIDEO' => 'Vídeo'))->setOptions(array('label_attributes' => array('class' => 'radio-inline')))->setAttribute("value", "IMAGEM");
     // Campo de midia
     $file = new File("midia");
     $file->setLabel('*Imagem (Tamanho exato de ' . \Base\Constant\Upload::BANNER_WIDTH . 'x' . \Base\Constant\Upload::BANNER_HEIGTH . ' px | ' . \Base\Constant\Upload::BANNER_MAX_SIZE . ')')->setAttribute('name', 'midia')->setAttribute('id', 'image');
     // Campo de midia2
     $file2 = new File("midia2");
     $file2->setLabel('*Video (' . \Base\Constant\Upload::BANNER_MAX_SIZE . ')')->setAttribute('id', 'video');
     // Botão de Submit
     $botao = new Submit("submit");
     $botao->setAttributes(array("value" => "Salvar"));
     // Adiciona campos
     $this->add($titulo)->add($tipo)->add($file)->add($file2)->add($botao);
 }
开发者ID:kayo-almeida,项目名称:cms-zend,代码行数:25,代码来源:HomeBannersForm.php

示例6: __construct

 public function __construct()
 {
     parent::__construct(null);
     $this->setInputFilter(new ReuniaoFilter());
     $this->setAttribute('method', 'POST')->setAttribute('enctype', 'multipart/form-data');
     $id = new \Zend\Form\Element\Hidden('id');
     $this->add($id);
     $data = new Text('data');
     $data->setLabel('Data')->setAttribute('autofocus', 'autofocus');
     $this->add($data);
     $eventos = new Text('eventos');
     $eventos->setLabel('Evento')->setAttribute('placeholder', 'Entre com o evento')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($eventos);
     $pauta = new Text('pauta');
     $pauta->setLabel('Pauta')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($pauta);
     $cardapio = new Textarea('cardapio');
     $cardapio->setLabel('Cardápio')->setAttribute('cols', '60')->setAttribute('rows', '5');
     $this->add($cardapio);
     $listaPresente = new Textarea('lista_presente');
     $listaPresente->setLabel('Lista de Presente')->setAttribute('cols', '60')->setAttribute('rows', '5');
     $this->add($listaPresente);
     $ata = new Text('ata');
     $ata->setLabel('Ata')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($ata);
     $imagnes = new File('imagens');
     $imagnes->setLabel('Imagens')->setAttribute('id', 'imagnes');
     $this->add($imagnes);
     $button = new Button('submit');
     $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success'));
     $this->add($button);
 }
开发者ID:souzagabi,项目名称:Agenda,代码行数:32,代码来源:ReuniaoForm.php

示例7: __construct

 public function __construct($name = null)
 {
     parent::__construct('registration');
     $this->setAttribute('method', 'post');
     /*
             $this->add(array(
                 'name' => 'file',
                 'attributes' => array(
                     'type'  => 'Zend\Form\Element\File',
                 ),
                 'options' => array(
                     'label' => 'Single file input',
                 ),
             ));
     */
     // Single file upload
     $file = new Element\File('file');
     $file->setLabel('Single file input');
     // HTML5 multiple file upload
     $multiFile = new Element\File('multi-file');
     $multiFile->setLabel('Multi file input')->setAttribute('multiple', true);
     // $form = new Form('my-file');
     $this->add($file)->add($multiFile);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Upload', 'id' => 'submitbutton')));
 }
开发者ID:houzoumi,项目名称:fmi,代码行数:25,代码来源:FileForm.php

示例8: addElements

 public function addElements()
 {
     // File Input
     $file = new Element\File('image-file');
     $file->setLabel('Avatar Image Upload')->setAttribute('id', 'image-file');
     $this->add($file);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Upload', 'id' => 'submitbutton')));
 }
开发者ID:houzoumi,项目名称:fmi,代码行数:8,代码来源:UploadSimpleForm.php

示例9: addElements

 public function addElements()
 {
     // File Input
     $file = new Element\File('file');
     $file->setLabel('File Input')->setAttributes(['id' => 'file', 'multiple' => true]);
     $this->add($file);
     // Progress ID hidden input is only added with a view helper,
     // not as an element to the form.
 }
开发者ID:arbi,项目名称:MyCode,代码行数:9,代码来源:TaskUpload.php

示例10: addElements

 public function addElements()
 {
     // File Input
     $file = new Element\File('file');
     $file->setLabel('Image Upload')->setAttribute('id', 'file')->setAttribute('multiple', true);
     // That's it
     $this->add($file);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Upload', 'id' => 'submitbutton')));
 }
开发者ID:Primetron,项目名称:Edusoft,代码行数:9,代码来源:UploadForm.php

示例11: __construct

 public function __construct($name = null, array $classificacoes = null)
 {
     parent::__construct($name);
     $this->classificacoes = $classificacoes;
     $this->setInputFilter(new PessoaFilter());
     $this->setAttribute('method', 'POST');
     $this->setAttribute('enctype', 'multipart/form-data');
     $id = new \Zend\Form\Element\Hidden('id');
     $this->add($id);
     $titulo = new Text('nome');
     $titulo->setLabel('Nome  :  ')->setAttribute('placeholder', 'Entre com o nome')->setAttribute('maxlength', 100)->setAttribute('size', 50)->setAttribute('autofocus', 'autofocus');
     $this->add($titulo);
     $classificacao = new Select();
     $classificacao->setLabel("Classificacao ")->setName("classification")->setOptions(array('value_options' => $classificacoes));
     $this->add($classificacao);
     $dataAdmissao = new Text('data_admissao');
     $dataAdmissao->setLabel('Data Admissão');
     $this->add($dataAdmissao);
     $enderecoResidencial = new Text('endereco_residencial');
     $enderecoResidencial->setLabel('End. Residencial:')->setAttribute('placeholder', 'Entre com o endereço residencial')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($enderecoResidencial);
     $telefoneResidencial = new Text('telefone_residencial');
     $telefoneResidencial->setLabel('Tel. Residencial');
     $this->add($telefoneResidencial);
     $celular = new Text('celular');
     $celular->setLabel('Celular');
     $this->add($celular);
     $emailPessoal = new Text('email_pessoal');
     $emailPessoal->setLabel('Email Pessoal');
     $this->add($emailPessoal);
     $enderecoComercial = new Text('endereco_comercial');
     $enderecoComercial->setLabel('End. Comercial:')->setAttribute('placeholder', 'Entre com o endereço comercial')->setAttribute('maxlength', 255)->setAttribute('size', 50);
     $this->add($enderecoComercial);
     $telefoneComercial = new Text('telefone_comercial');
     $telefoneComercial->setLabel('Tel. Comercial');
     $this->add($telefoneComercial);
     $emailComercial = new Text('email_comercial');
     $emailComercial->setLabel('Email Comercial');
     $this->add($emailComercial);
     $conjuge = new Text('conjuge');
     $conjuge->setLabel('Nome do Conjuge')->setAttribute('maxlength', 100)->setAttribute('size', 50);
     $this->add($conjuge);
     $celularConjuge = new Text('celular_conjuge');
     $celularConjuge->setLabel('Celular do Conjuge');
     $this->add($celularConjuge);
     /*===========================================================================================*/
     $fotografia = new File('fotografia');
     $fotografia->setLabel('Fotografia')->setAttribute('id', 'fotografia');
     $this->add($fotografia);
     /*===========================================================================================*/
     $ativo = new Checkbox('ativo');
     $ativo->setLabel('Ativo : ');
     $this->add($ativo);
     $button = new Button('submit');
     $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success'));
     $this->add($button);
 }
开发者ID:souzagabi,项目名称:Agenda,代码行数:57,代码来源:PessoaForm.php

示例12: addElements

 public function addElements()
 {
     // File Input
     $file = new Element\File('file');
     $file->setLabel('File Input')->setAttributes(array('id' => 'file', 'class' => 'form-control'));
     $this->add($file);
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'id'));
     $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'name' => 'file_type', 'attributes' => array('id' => 'file_type', 'options' => \Application\Form\OptionsConfig::getFormOption('file_upload_type'), 'class' => 'form-control', 'required' => true), 'options' => array('label' => 'Datei-Typ')));
 }
开发者ID:pnaq57,项目名称:zf2demo,代码行数:9,代码来源:SingleUpload.php

示例13: addElements

 public function addElements($multi)
 {
     $file = new Element\File('upload');
     $file->setLabel('Bild hinzufügen:')->setAttribute('id', 'file');
     if ($multi !== null) {
         $file->setAttribute('multiple', true);
     }
     $this->add($file);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Hochladen')));
 }
开发者ID:darkmatus,项目名称:schwarzessachsen-core,代码行数:10,代码来源:UploadForm.php

示例14: __construct

 public function __construct($name = null, $options = array())
 {
     parent::__construct($name, $options);
     // Staff Id
     $this->add(array('type' => 'Zend\\Form\\Element\\Hidden', 'name' => 'staff_id'));
     // File Input
     $file = new Element\File('image-file');
     $file->setLabel('Avatar Image Upload')->setAttribute('id', 'image-file');
     $this->add($file);
 }
开发者ID:srayner,项目名称:nickel,代码行数:10,代码来源:AvatarForm.php

示例15: addElements

 public function addElements()
 {
     $imageupload = new Element\File('imageupload');
     $imageupload->setLabel('Image Upload')->setAttribute('id', 'imageupload')->setAttribute('multiple', true);
     //Enables multiple file uploads
     $this->add($imageupload);
     $submit = new Element\Submit('submit');
     $submit->setValue('Upload Now');
     $this->add($submit);
 }
开发者ID:trungtranthanh93,项目名称:zendCommunication,代码行数:10,代码来源:MultiImageUploadForm.php


注:本文中的Zend\Form\Element\File::setLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。