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


PHP ConfigFormBase::submitForm方法代码示例

本文整理汇总了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);
  }
开发者ID:housineali,项目名称:drpl8_dv,代码行数:10,代码来源:CartSettingsForm.php

示例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);
 }
开发者ID:selwynpolit,项目名称:d8_test2,代码行数:10,代码来源:ConfigFormExampleConfigForm.php

示例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);
 }
开发者ID:opdavies,项目名称:nwdrupalwebsite,代码行数:10,代码来源:MeetupPullConfig.php

示例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();
 }
开发者ID:tomwhartung,项目名称:jmws_idMyGadget_for_drupal-d8,代码行数:10,代码来源:ConfigFormIdMyGadgetBase.php

示例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();
 }
开发者ID:mbaynton,项目名称:pinterest_responsive,代码行数:10,代码来源:ConfigForm.php

示例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']);
 }
开发者ID:eloiv,项目名称:botafoc.cat,代码行数:10,代码来源:DropdownLanguageSettings.php

示例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);
 }
开发者ID:anyforsoft,项目名称:csua_d8,代码行数:10,代码来源:CategoriesForm.php

示例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);
 }
开发者ID:dmyerson,项目名称:d8ecs,代码行数:10,代码来源:GoogleAnalyticsLiteForm.php

示例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();
 }
开发者ID:eloiv,项目名称:botafoc.cat,代码行数:10,代码来源:LogouttabSettingsForm.php

示例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);
 }
开发者ID:systemick3,项目名称:systemick.co.uk,代码行数:10,代码来源:TweetsSettingsForm.php

示例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);
 }
开发者ID:Happyculture,项目名称:exercices,代码行数:12,代码来源:AlexandrieConfigForm.php

示例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);
 }
开发者ID:pjcarly,项目名称:drupal8-spectrum,代码行数:7,代码来源:AdminSettingsForm.php

示例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();
 }
开发者ID:sriharisahu,项目名称:hugs,代码行数:7,代码来源:ConfigForm.php

示例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);
 }
开发者ID:anyforsoft,项目名称:csua_d8,代码行数:10,代码来源:GeneralForm.php

示例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);
 }
开发者ID:anyforsoft,项目名称:csua_d8,代码行数:10,代码来源:QuestionsForm.php


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