當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。