/**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $form['query_param'] = array('#type' => 'textfield', '#title' => $this->t('Query parameter'), '#description' => $this->t('The query parameter to use.'), '#default_value' => $this->options['query_param']);
     $form['fallback'] = array('#type' => 'textfield', '#title' => $this->t('Fallback value'), '#description' => $this->t('The fallback value to use when the above query parameter is not present.'), '#default_value' => $this->options['fallback']);
     $form['multiple'] = array('#type' => 'radios', '#title' => $this->t('Multiple values'), '#description' => $this->t('Conjunction to use when handling multiple values. E.g. "?value[0]=a&value[1]=b".'), '#default_value' => $this->options['multiple'], '#options' => array('and' => $this->t('AND'), 'or' => $this->t('OR')));
 }
예제 #2
0
파일: Tid.php 프로젝트: alnutile/drunatra
 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $options['term_page'] = array('default' => TRUE, 'bool' => TRUE);
     $options['node'] = array('default' => FALSE, 'bool' => TRUE);
     $options['anyall'] = array('default' => ',');
     $options['limit'] = array('default' => FALSE, 'bool' => TRUE);
     $options['vids'] = array('default' => array());
     return $options;
 }
예제 #3
0
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $form['index'] = array('#type' => 'select', '#title' => $this->t('Path component'), '#default_value' => $this->options['index'], '#options' => range(1, 10), '#description' => $this->t('The numbering starts from 1, e.g. on the page admin/structure/types, the 3rd path component is "types".'));
     $form['use_alias'] = array('#type' => 'checkbox', '#title' => $this->t('Use path alias'), '#default_value' => $this->options['use_alias'], '#description' => $this->t('Use path alias instead of internal path.'));
 }
예제 #4
0
파일: User.php 프로젝트: aWEBoLabs/taxi
 /**
  * {@inheritdoc}
  */
 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $options['user'] = array('default' => '');
     return $options;
 }
예제 #5
0
파일: Fixed.php 프로젝트: aWEBoLabs/taxi
 /**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $form['argument'] = array('#type' => 'textfield', '#title' => $this->t('Fixed value'), '#default_value' => $this->options['argument']);
 }
예제 #6
0
파일: Tid.php 프로젝트: nsp15/Drupal8
 /**
  * {@inheritdoc}
  */
 public function calculateDependencies()
 {
     $dependencies = parent::calculateDependencies();
     foreach ($this->vocabularyStorage->loadMultiple(array_keys($this->options['vids'])) as $vocabulary) {
         $dependencies[$vocabulary->getConfigDependencyKey()][] = $vocabulary->getConfigDependencyName();
     }
     return $dependencies;
 }
예제 #7
0
파일: Node.php 프로젝트: ddrozdik/dmaps
 /**
  * Constructs a new Node instance.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  *
  * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
  *   The route match.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->routeMatch = $route_match;
 }
예제 #8
0
 /**
  * Constructs a new Date instance.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
  *   The date formatter service.
  * @param \Symfony\Component\HttpFoundation\Request $request
  *   The current request.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatterInterface $date_formatter, Request $request)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->dateFormatter = $date_formatter;
     $this->request = $request;
 }
예제 #9
0
 /**
  * {@inheritdoc}
  */
 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $options['user'] = array('default' => '', 'bool' => TRUE, 'translatable' => FALSE);
     return $options;
 }
 /**
  * {@inheritdoc}
  */
 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $options['example_option'] = ['default' => ''];
     return $options;
 }