當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DisplayPluginBase::submitOptionsForm方法代碼示例

本文整理匯總了PHP中Drupal\views\Plugin\views\display\DisplayPluginBase::submitOptionsForm方法的典型用法代碼示例。如果您正苦於以下問題:PHP DisplayPluginBase::submitOptionsForm方法的具體用法?PHP DisplayPluginBase::submitOptionsForm怎麽用?PHP DisplayPluginBase::submitOptionsForm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Drupal\views\Plugin\views\display\DisplayPluginBase的用法示例。


在下文中一共展示了DisplayPluginBase::submitOptionsForm方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: submitOptionsForm

 /**
  * Perform any necessary changes to the form values prior to storage.
  * There is no need for this function to actually store the data.
  */
 public function submitOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::submitOptionsForm($form, $form_state);
     $section = $form_state->get('section');
     switch ($section) {
         case 'block_description':
         case 'block_category':
         case 'allow':
         case 'block_hide_empty':
             $this->setOption($section, $form_state->getValue($section));
             break;
     }
 }
開發者ID:ravibarnwal,項目名稱:laraitassociate.in,代碼行數:17,代碼來源:Block.php

示例2: submitOptionsForm

 /**
  * {@inheritdoc}
  */
 public function submitOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::submitOptionsForm($form, $form_state);
     switch ($form_state->get('section')) {
         case 'test_option':
             $this->setOption('test_option', $form_state->getValue('test_option'));
             break;
     }
 }
開發者ID:ddrozdik,項目名稱:dmaps,代碼行數:12,代碼來源:DisplayTest.php

示例3: submitOptionsForm

 /**
  * Perform any necessary changes to the form values prior to storage.
  * There is no need for this function to actually store the data.
  */
 public function submitOptionsForm(&$form, FormStateInterface $form_state)
 {
     // It is very important to call the parent function here:
     parent::submitOptionsForm($form, $form_state);
     switch ($form_state['section']) {
         case 'displays':
             $form_state['values'][$form_state['section']] = array_filter($form_state['values'][$form_state['section']]);
         case 'inherit_arguments':
         case 'inherit_pager':
         case 'render_pager':
         case 'inherit_exposed_filters':
         case 'attachment_position':
             $this->setOption($form_state['section'], $form_state['values'][$form_state['section']]);
             break;
     }
 }
開發者ID:anatalsceo,項目名稱:en-classe,代碼行數:20,代碼來源:Attachment.php

示例4: submitOptionsForm

 /**
  * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::submitOptionsForm().
  */
 public function submitOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::submitOptionsForm($form, $form_state);
     if ($form_state->get('section') == 'path') {
         $this->setOption('path', $form_state->getValue('path'));
     }
 }
開發者ID:HakS,項目名稱:drupal8_training,代碼行數:10,代碼來源:PathPluginBase.php

示例5: submitOptionsForm

 /**
  * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::submitOptionsForm().
  */
 public function submitOptionsForm(&$form, &$form_state)
 {
     parent::submitOptionsForm($form, $form_state);
     if ($form_state['section'] == 'path') {
         $this->setOption('path', $form_state['values']['path']);
     }
 }
開發者ID:alnutile,項目名稱:drunatra,代碼行數:10,代碼來源:PathPluginBase.php

示例6: submitOptionsForm

 /**
  * Perform any necessary changes to the form values prior to storage.
  * There is no need for this function to actually store the data.
  */
 public function submitOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::submitOptionsForm($form, $form_state);
     switch ($form_state['section']) {
         case 'block_description':
         case 'block_category':
         case 'allow':
         case 'block_hide_empty':
             $this->setOption($form_state['section'], $form_state['values'][$form_state['section']]);
             break;
     }
 }
開發者ID:anatalsceo,項目名稱:en-classe,代碼行數:16,代碼來源:Block.php

示例7: submitOptionsForm

 /**
  * Overrides Drupal\views\Plugin\views\display\DisplayPluginBase::submitOptionsForm().
  */
 public function submitOptionsForm(&$form, &$form_state)
 {
     parent::submitOptionsForm($form, $form_state);
     switch ($form_state['section']) {
         case 'test_option':
             $this->setOption('test_option', $form_state['values']['test_option']);
             break;
     }
 }
開發者ID:alnutile,項目名稱:drunatra,代碼行數:12,代碼來源:DisplayTest.php


注:本文中的Drupal\views\Plugin\views\display\DisplayPluginBase::submitOptionsForm方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。