當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractType::buildView方法代碼示例

本文整理匯總了PHP中Symfony\Component\Form\AbstractType::buildView方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractType::buildView方法的具體用法?PHP AbstractType::buildView怎麽用?PHP AbstractType::buildView使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\Form\AbstractType的用法示例。


在下文中一共展示了AbstractType::buildView方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: buildView

 /**
  * @param FormView      $view
  * @param FormInterface $form
  * @param array         $options
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     if (isset($view->vars['name']) && '' !== $view->vars['name'] && null !== $view->vars['name']) {
         $view->vars['label'] = 'open_orchestra_backoffice.form.content_type.default_listable_label.' . $view->vars['name'];
     }
 }
開發者ID:open-orchestra,項目名稱:open-orchestra-cms-bundle,代碼行數:12,代碼來源:DefaultListableCheckboxType.php

示例2: buildView

 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     $view->vars['label'] = false;
     $view->vars['attr'] = array();
     $view->vars['label_attr'] = array();
 }
開發者ID:scaytrase,項目名稱:form-extensions,代碼行數:7,代碼來源:EntityAutocompleteType.php

示例3: buildView

 /**
  * {@inheritdoc}
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     $view->vars['dataSrc'] = $this->getDataSrc();
     $view->vars['lookaheadId'] = $options['lookahead_id'];
     $view->vars['lateInit'] = $options['late_init'];
     parent::buildView($view, $form, $options);
 }
開發者ID:binaryfr3ak,項目名稱:sfitixi,代碼行數:10,代碼來源:AbstractLookaheadType.php

示例4: buildView

 /**
  * {@inheritdoc}
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     $widgetOptions = $this->parseWidgetOptions(array_intersect_key($options, $this->widgetOptions));
     $view->vars['attr']['switchery'] = null;
     $view->vars['attr']['switchery-options'] = json_encode($widgetOptions);
     parent::buildView($view, $form, $options);
 }
開發者ID:ynloultratech,項目名稱:framework,代碼行數:10,代碼來源:SwitcheryType.php

示例5: buildView

 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     $view->vars['labelAdd'] = $options['labelAdd'];
     $view->vars['labelDelete'] = $options['labelDelete'];
     $view->vars['prototype_name'] = $options['prototype_name'];
 }
開發者ID:hunter686,項目名稱:hitechonline,代碼行數:7,代碼來源:OrderProductCollectionType.php

示例6: buildView

 /**
  * {@inheritdoc}
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     /** @var SimpleChoiceList $choices */
     $choices = $form->get('type')->getConfig()->getOption('choice_list');
     $view->vars['datetime_range_metadata'] = ['name' => $view->vars['full_name'] . '[type]', 'label' => $view->vars['label'], 'choices' => $choices->getRemainingViews(), 'typeValues' => $view->vars['type_values'], 'dateParts' => $view->vars['date_parts'], 'externalWidgetOptions' => array_merge($view->vars['widget_options'], ['dateVars' => $view->vars['date_vars']]), 'templateSelector' => '#date-filter-template-wo-actions', 'criteriaValueSelectors' => ['type' => 'select', 'date_type' => 'select[name!=date_part]', 'date_part' => 'select[name=date_part]', 'value' => ['start' => 'input[name=\\"' . $view->vars['full_name'] . '[value][start]\\"]', 'end' => 'input[name=\\"' . $view->vars['full_name'] . '[value][end]\\"]']]];
 }
開發者ID:nmallare,項目名稱:platform,代碼行數:10,代碼來源:WidgetDateRangeType.php

示例7: buildView

 /**
  * {@inheritdoc}
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     if (array_key_exists('mde_config', $options)) {
         $view->vars['mde_config'] = $options['mde_config'];
     }
 }
開發者ID:Raphy,項目名稱:RaphyMarkdownBundle,代碼行數:10,代碼來源:MarkdownType.php

示例8: buildView

 /**
  * @param FormView $view
  * @param FormInterface $form
  * @param array $options
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     //        $view->vars = array_merge($view->vars, array(
     //            'entity' => $options['entity']
     //        ));
 }
開發者ID:devgiants,項目名稱:seo-bundle,代碼行數:12,代碼來源:SeoType.php

示例9: buildView

 /**
  * {@inheritDoc}
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     $view->vars['root'] = $options['root'];
     $view->vars['create_in_overlay'] = $options['create_in_overlay'];
     $view->vars['edit_in_overlay'] = $options['edit_in_overlay'];
     $view->vars['delete_in_overlay'] = $options['delete_in_overlay'];
     parent::buildView($view, $form, $options);
 }
開發者ID:Aaike,項目名稱:SonataDoctrinePhpcrAdminBundle,代碼行數:11,代碼來源:TreeManagerType.php

示例10: buildView

 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     $view->vars['preaddonAttr'] = isset($options['attr']['preaddon_attr']) ? $options['attr']['preaddon_attr'] : [];
     $view->vars['postaddonAttr'] = isset($options['attr']['postaddon_attr']) ? $options['attr']['postaddon_attr'] : [];
     $view->vars['preaddon'] = isset($options['attr']['preaddon']) ? $options['attr']['preaddon'] : [];
     $view->vars['postaddon'] = isset($options['attr']['postaddon']) ? $options['attr']['postaddon'] : [];
 }
開發者ID:dongilbert,項目名稱:mautic,代碼行數:8,代碼來源:SortableValueLabelListType.php

示例11: buildView

 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     $view->vars['type'] = 'compact' === $options['widget'] ? 'text' : 'hidden';
     $view->vars['widget'] = $options['widget'];
     $view->vars['root_node'] = $options['root_node'];
     $view->vars['repository_name'] = $options['repository_name'];
 }
開發者ID:symfony-cmf,項目名稱:tree-browser-bundle,代碼行數:8,代碼來源:TreeSelectType.php

示例12: buildView

 /**
  * {@inheritdoc}
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     // Detect nette/application v2.4+.
     $prefix = property_exists('Nette\\Application\\UI\\Component', 'onAnchor') && $form->getRoot()->getConfig()->getMethod() === 'POST';
     $view->vars['full_name'] = ($prefix ? '_' : '') . Presenter::SIGNAL_KEY;
     $view->vars['value'] = $options['data'];
 }
開發者ID:Arachne,項目名稱:Forms,代碼行數:11,代碼來源:SignalType.php

示例13: buildView

 /**
  * {@inheritDoc}
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     $view->vars['tree'] = $this->tree;
     $view->vars['root_node'] = $form->getConfig()->getAttribute('root_node');
     $view->vars['select_root_node'] = $form->getConfig()->getAttribute('select_root_node');
     $view->vars['routing_defaults'] = $this->defaults;
 }
開發者ID:Aaike,項目名稱:SonataDoctrinePhpcrAdminBundle,代碼行數:11,代碼來源:TreeModelType.php

示例14: buildView

 /**
  * {@inheritdoc}
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     $vars = array('configs' => $options['configs']);
     if ($form->getData()) {
         $vars['attr'] = array('data-entities' => json_encode(array(array('id' => $form->getData(), 'text' => $form->getData()))));
     }
     $view->vars = array_replace_recursive($view->vars, $vars);
 }
開發者ID:ashutosh-srijan,項目名稱:findit_akeneo,代碼行數:12,代碼來源:OroIconType.php

示例15: buildView

 /**
  * (non-PHPdoc)
  * @see \Symfony\Component\Form\AbstractType::buildView()
  */
 public function buildView(FormView $view, FormInterface $form, array $options)
 {
     parent::buildView($view, $form, $options);
     $attr = array("rows" => 8, "class" => "wysiwyg-editor");
     if (array_key_exists("attr", $options)) {
         $attr = array_merge($attr, $options["attr"]);
     }
     $view->vars = array_replace($view->vars, array("attr" => $attr));
 }
開發者ID:Ad-Honorem,項目名稱:site,代碼行數:13,代碼來源:WYSIWYGType.php


注:本文中的Symfony\Component\Form\AbstractType::buildView方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。