예제 #1
0
 /**
  * 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;
     }
 }
예제 #2
0
 /**
  * {@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;
     }
 }
예제 #3
0
 /**
  * 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;
     }
 }
예제 #4
0
 /**
  * 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'));
     }
 }
예제 #5
0
 /**
  * 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']);
     }
 }
예제 #6
0
 /**
  * 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;
     }
 }
예제 #7
0
 /**
  * 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;
     }
 }