本文整理汇总了PHP中Drupal\Core\Form\ConfigFormBase::submitForm方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigFormBase::submitForm方法的具体用法?PHP ConfigFormBase::submitForm怎么用?PHP ConfigFormBase::submitForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Form\ConfigFormBase
的用法示例。
在下文中一共展示了ConfigFormBase::submitForm方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this->configFactory->getEditable('commerce_cart.settings');
$config->set('cart_page.view', $form_state->getValue('view'));
$config->save();
parent::submitForm($form, $form_state);
}
示例2: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
$config = $this->config('configform_example.settings');
$config->set('email_address', $form_state->getValue('email'));
$config->save();
return parent::submitForm($form, $form_state);
}
示例3: submitForm
/**
* Implements \Drupal\Core\Form\FormInterface::submitForm().
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
$config = $this->configFactory()->getEditable('meetup_pull.settings');
$config->set('api_key', $form_state->getValue('api_key'))->save();
$config->set('group_name', $form_state->getValue('group_name'))->save();
parent::submitForm($form, $form_state);
}
示例4: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
parent::submitForm($form, $form_state);
// $config = $this->config('idmygadget.settings');
// $config->set('idmygadget_', $form_state->getValue('idmygadget_'));
// $config->save();
}
示例5: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
parent::submitForm($form, $form_state);
// normalize line endings to \n
$selectors = preg_replace('/[\\r\\n]+/', "\n", $form_state->getValue('exclude_hover_selectors'));
$this->config('pinterest_hover.settings')->set('load_pinterest_js', $form_state->getValue('load_pinterest_js'))->set('exclude_hover_selectors', $selectors)->save();
}
示例6: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->config('dropdown_language.setting')
->set('wrapper', $form_state->getValue('wrapper'))
->save();
parent::submitForm($form, $form_state);
Cache::invalidateTags(['rendered']);
}
示例7: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
// Remove unnecessary values.
form_state_values_clean($form_state);
$this->config('faq.settings')->set('use_categories', $form_state['values']['faq_use_categories'])->set('category_display', $form_state['values']['faq_category_display'])->set('category_listing', $form_state['values']['faq_category_listing'])->set('category_hide_qa_accordion', $form_state['values']['faq_category_hide_qa_accordion'])->set('count', $form_state['values']['faq_count'])->set('answer_category_name', $form_state['values']['faq_answer_category_name'])->set('group_questions_top', $form_state['values']['faq_group_questions_top'])->set('hide_child_terms', $form_state['values']['faq_hide_child_terms'])->set('show_term_page_children', $form_state['values']['faq_show_term_page_children'])->set('omit_vocabulary', $form_state['values']['faq_omit_vocabulary'])->save();
parent::submitForm($form, $form_state);
}
示例8: submitForm
/**
* Implements \Drupal\Core\Form\FormInterface::submitForm().
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
$values = $form_state->getValues();
$config = $this->config('google_analytics_lite.settings');
$config->set('trackingId', $values['trackingId'])->save();
parent::submitForm($form, $form_state);
}
示例9: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this->config('logouttab.settings')
->set('url', $form_state->getValue('url'))
->set('weight', $form_state->getValue('weight'))
->save();
}
示例10: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
$config = $this->config('tweets.settings');
$config->set('twitter_secret_key', $form_state->getValue('twitter_secret_key'))->set('twitter_api_key', $form_state->getValue('twitter_api_key'))->set('twitter_access_api_key', $form_state->getValue('twitter_access_api_key'))->set('twitter_access_secret_key', $form_state->getValue('twitter_access_secret_key'))->set('twitter_username', $form_state->getValue('twitter_username'))->set('max_tweets', $form_state->getValue('max_tweets'));
$config->save();
parent::submitForm($form, $form_state);
}
示例11: submitForm
/**
* Submit callback.
*
* Implements the form logic.
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
$this->config('happy_alexandrie.library_config')->set('opening_hours', $form_state->getValue('opening_hours'))->save();
// Call the parent implementation to inherit from what has been done in it.
// In our case, display the confirmation message.
parent::submitForm($form, $form_state);
}
示例12: submitForm
public function submitForm(array &$form, FormStateInterface $form_state)
{
$config = $this->config('spectrum.settings');
$config->set('sendgrid_api_key', $form_state->getValue('sendgrid_api_key'));
$config->save();
parent::submitForm($form, $form_state);
}
示例13: submitForm
public function submitForm(array &$form, FormStateInterface $form_state)
{
parent::submitForm($form, $form_state);
$config = $this->config('hugs.settings');
$config->set('default_count', $form_state->getValue('default_count'));
$config->save();
}
示例14: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
// Remove unnecessary values.
form_state_values_clean($form_state);
$this->config('faq.settings')->set('title', $form_state['values']['faq_title'])->set('description', $form_state['values']['faq_description'])->set('custom_breadcrumbs', $form_state['values']['faq_custom_breadcrumbs'])->save();
parent::submitForm($form, $form_state);
}
示例15: submitForm
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state)
{
// Remove unnecessary values.
form_state_values_clean($form_state);
$this->config('faq.settings')->set('display', $form_state['values']['faq_display'])->set('question_listing', $form_state['values']['faq_question_listing'])->set('qa_mark', $form_state['values']['faq_qa_mark'])->set('question_label', $form_state['values']['faq_question_label'])->set('answer_label', $form_state['values']['faq_answer_label'])->set('question_length', $form_state['values']['faq_question_length'])->set('question_long_form', $form_state['values']['faq_question_long_form'])->set('hide_qa_accordion', $form_state['values']['faq_hide_qa_accordion'])->set('show_expand_all', $form_state['values']['faq_show_expand_all'])->set('use_teaser', $form_state['values']['faq_use_teaser'])->set('back_to_top', $form_state['values']['faq_back_to_top'])->set('disable_node_links', $form_state['values']['faq_disable_node_links'])->set('default_sorting', $form_state['values']['faq_default_sorting'])->save();
parent::submitForm($form, $form_state);
}