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


PHP Form::addFileEntityInput方法代码示例

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


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

示例1: configure

 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addGroup('Person');
     $form->addSelect('type', 'Person', PersonEntity::getTypes());
     $form->addText('name', 'Name');
     $form->addFileEntityInput('logo', 'Logo');
     $form->addManyToMany('users', 'Users');
     $form->addTextArea('description', 'Description');
     $form->addGroup('Address');
     $form->addText('street', 'Street');
     $form->addText('number', 'Number');
     $form->addText('city', 'City');
     $form->addText('zip', 'ZIP');
     $form->addGroup('Contacts');
     $form->addText('email', 'Email')->addCondition($form::FILLED)->addRule($form::EMAIL);
     $form->addText('phone', 'Phone');
     $form->addText('fax', 'Fax');
     $form->addText('website', 'Website')->addCondition($form::FILLED)->addRule($form::URL);
     $form->addGroup('Billing information');
     $form->addText('identificationNumber', 'IN');
     $form->addText('taxIdentificationNumber', 'TIN');
     $form->addText('registration', 'Registration');
     $form->addCheckbox('taxpayer', 'Taxpayer');
     $form->addFileEntityInput('signature', 'Signature');
     $form->addSaveButton('Save');
 }
开发者ID:svobodni,项目名称:web,代码行数:29,代码来源:PersonFormFactory.php

示例2: configure

 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addGroup();
     $form->addText('name', 'Name');
     $form->addText('localUrl', 'URL');
     $form->addText('title', 'Title');
     $form->addText('keywords', 'Keywords');
     $form->addText('description', 'Description');
     $form->addManyToOne('author', 'Author');
     $form->addSelect('robots', 'Robots')->setItems(RouteEntity::getRobotsValues(), FALSE);
     $form->addSelect('changefreq', 'Change frequency')->setItems(RouteEntity::getChangefreqValues(), FALSE)->setPrompt('-------');
     $form->addSelect('priority', 'Priority')->setItems(RouteEntity::getPriorityValues(), FALSE)->setPrompt('-------');
     // layout
     $form->setCurrentGroup($form->addGroup());
     $form->addCheckbox('copyLayoutFromParent', 'Layout from parent');
     $form['copyLayoutFromParent']->addCondition($form::EQUAL, FALSE)->toggle('group-layout_' . $form->data->id);
     $form->setCurrentGroup($form->getForm()->addGroup()->setOption('id', 'group-layout_' . $form->data->id));
     $form->addManyToOne('layout', 'Layout');
     $form->setCurrentGroup($form->addGroup());
     $form->addCheckbox('copyLayoutToChildren', 'Share layout with children');
     $form['copyLayoutToChildren']->addCondition($form::EQUAL, FALSE)->toggle('group-layout2_' . $form->data->id);
     $form->setCurrentGroup($form->getForm()->addGroup()->setOption('id', 'group-layout2_' . $form->data->id));
     $form->addManyToOne('childrenLayout', 'Share new layout');
     // cache
     $form->setCurrentGroup($form->addGroup());
     $form->addCheckbox('copyCacheModeFromParent', 'Cache mode from parent');
     $form['copyCacheModeFromParent']->addCondition($form::EQUAL, FALSE)->toggle('group-cache_' . $form->data->id);
     $form->setCurrentGroup($form->getForm()->addGroup()->setOption('id', 'group-cache_' . $form->data->id));
     $form->addSelect('cacheMode', 'Cache strategy')->setItems(\CmsModule\Content\Entities\RouteEntity::getCacheModes(), FALSE)->setPrompt('off');
     $form->setCurrentGroup($form->addGroup());
     $form->addFileEntityInput('photo', 'Photo');
     $form->addTextArea('notation', 'Notation');
     $form->addTextArea('text', 'Text');
     $form->addGroup('Dates');
     $form->addDateTime('created', 'Created')->setDisabled(TRUE);
     $form->addDateTime('updated', 'Updated')->setDisabled(TRUE);
     $form->addDateTime('released', 'Released')->addRule($form::FILLED);
     $form->addDateTime('expired', 'Expired');
     $form->addGroup('Tags');
     $form->addContentTags('tags');
     $aliases = $form->addMany('aliases', function (\Venne\Forms\Container $container) use($form) {
         $container->setCurrentGroup($form->addGroup('URL alias'));
         $container->addText('aliasUrl', 'Url')->setRequired();
         $container->addText('aliasLang', 'Language alias');
         $container->addText('aliasDomain', 'Domain url');
         $container->addSubmit('remove', 'Remove alias')->addRemoveOnClick();
     });
     $aliases->addSubmit('add', 'Add alias')->addCreateOnClick();
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
开发者ID:svobodni,项目名称:web,代码行数:54,代码来源:RouteFormFactory.php

示例3: configure

 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addGroup();
     $form->addFileEntityInput('image', 'Image');
     $form->addText('alt', 'Alt');
     if (!$form->data->hideWidth || !$form->data->hideHeight || !$form->data->hideFormat) {
         $form->addGroup('Size');
         if (!$form->data->hideWidth) {
             $form->addText('width', 'Width')->addCondition($form::FILLED)->addRule($form::INTEGER);
         }
         if (!$form->data->hideHeight) {
             $form->addText('height', 'Height')->addCondition($form::FILLED)->addRule($form::INTEGER);
         }
         if (!$form->data->hideFormat) {
             $form->addSelect('format', 'Format', array(0 => 'Fit', 1 => 'Shrink only', 2 => 'Stretch', 4 => 'Fill', 8 => 'Exact'));
         }
     }
     if (!$form->data->hideType) {
         $form->addSelect('type', 'Type', array('png' => 'PNG', 'jpeg' => 'JPEG', 'gif' => 'GIF'))->setPrompt('-- default --');
     }
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
开发者ID:svobodni,项目名称:web,代码行数:26,代码来源:AbstractImageFormFactory.php

示例4: configure

 /**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addFileEntityInput('file', 'File');
     $form->addSaveButton('Save');
 }
开发者ID:venne,项目名称:invoices-module,代码行数:8,代码来源:RevisionFormFactory.php

示例5: configure

 public function configure(Form $form)
 {
     $form->addFileEntityInput('_photos', 'Upload photos')->setMulti(TRUE);
     $form->addSaveButton('Upload');
 }
开发者ID:svobodni,项目名称:web,代码行数:5,代码来源:UploadFormFactory.php


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