本文整理汇总了PHP中Drupal\views\Plugin\views\style\StylePluginBase::submitOptionsForm方法的典型用法代码示例。如果您正苦于以下问题:PHP StylePluginBase::submitOptionsForm方法的具体用法?PHP StylePluginBase::submitOptionsForm怎么用?PHP StylePluginBase::submitOptionsForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\views\Plugin\views\style\StylePluginBase
的用法示例。
在下文中一共展示了StylePluginBase::submitOptionsForm方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: submitOptionsForm
/**
* {@inheritdoc}
*/
public function submitOptionsForm(&$form, FormStateInterface $form_state)
{
parent::submitOptionsForm($form, $form_state);
$formats = $form_state->getValue(array('style_options', 'formats'));
$form_state->setValue(array('style_options', 'formats'), array_filter($formats));
}
示例2: submitOptionsForm
/**
* {@inheritdoc}
*/
public function submitOptionsForm(&$form, &$form_state)
{
parent::submitOptionsForm($form, $form_state);
$form_state['values']['style_options']['formats'] = array_filter($form_state['values']['style_options']['formats']);
}
示例3: submitOptionsForm
/**
* {@inheritdoc}
*/
public function submitOptionsForm(&$form, FormStateInterface $form_state)
{
$multiday_hidden = $form_state->getValue(['style_options', 'multiday_hidden']);
$form_state->setValue(['style_options', 'multiday_hidden'], array_filter($multiday_hidden));
parent::submitOptionsForm($form, $form_state);
}
示例4: submitOptionsForm
/**
* {@inheritdoc}
*/
public function submitOptionsForm(&$form, FormStateInterface $form_state)
{
parent::submitOptionsForm($form, $form_state);
/* Move flexslider options to the parent array so that
* values are saved properly.
* Original: values['style_options']['flexslider'] = ['options', 'caption', 'id'].
*/
$flexslider_options = $form_state->getValue(array('style_options', 'flexslider'));
// Edit: values['style_options'] += ['options', 'caption', 'id'].
foreach ($flexslider_options as $key => $value) {
$form_state->setValue(array('style_options', $key), $value);
}
// Edit: values['style_options']['flexslider'] = NULL.
$form_state->setValue(array('style_options', 'flexslider'), NULL);
}
示例5: submitOptionsForm
/**
* {@inheritdoc}
*/
public function submitOptionsForm(&$form, &$form_state)
{
parent::submitOptionsForm($form, $form_state);
foreach ($this->pluginBag as $plugin) {
$plugin->submitOptionsForm($form, $form_state);
}
}