本文整理汇总了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'];
}
}
示例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();
}
示例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);
}
示例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);
}
示例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'];
}
示例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]\\"]']]];
}
示例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'];
}
}
示例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']
// ));
}
示例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);
}
示例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'] : [];
}
示例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'];
}
示例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'];
}
示例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;
}
示例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);
}
示例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));
}