Skip to content
Snippets Groups Projects
Commit a0920018 authored by Jess's avatar Jess
Browse files

Issue #2600328 by aanschut, brandenlhamilton, dawehner, pjonckiere: Argument...

Issue #2600328 by aanschut, brandenlhamilton, dawehner, pjonckiere: Argument default plugin docblocks
parent cced89ec
No related branches found
No related tags found
No related merge requests found
...@@ -95,6 +95,9 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o ...@@ -95,6 +95,9 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
} }
} }
/**
* {@inheritdoc}
*/
protected function defineOptions() { protected function defineOptions() {
$options = parent::defineOptions(); $options = parent::defineOptions();
...@@ -107,6 +110,9 @@ protected function defineOptions() { ...@@ -107,6 +110,9 @@ protected function defineOptions() {
return $options; return $options;
} }
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) { public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['term_page'] = array( $form['term_page'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
...@@ -165,6 +171,9 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { ...@@ -165,6 +171,9 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
); );
} }
/**
* {@inheritdoc}
*/
public function submitOptionsForm(&$form, FormStateInterface $form_state, &$options = array()) { public function submitOptionsForm(&$form, FormStateInterface $form_state, &$options = array()) {
// Filter unselected items so we don't unnecessarily store giant arrays. // Filter unselected items so we don't unnecessarily store giant arrays.
$options['vids'] = array_filter($options['vids']); $options['vids'] = array_filter($options['vids']);
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
*/ */
class CurrentUser extends ArgumentDefaultPluginBase implements CacheableDependencyInterface { class CurrentUser extends ArgumentDefaultPluginBase implements CacheableDependencyInterface {
/**
* {@inheritdoc}
*/
public function getArgument() { public function getArgument() {
return \Drupal::currentUser()->id(); return \Drupal::currentUser()->id();
} }
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
*/ */
class Fixed extends ArgumentDefaultPluginBase implements CacheableDependencyInterface { class Fixed extends ArgumentDefaultPluginBase implements CacheableDependencyInterface {
/**
* {@inheritdoc}
*/
protected function defineOptions() { protected function defineOptions() {
$options = parent::defineOptions(); $options = parent::defineOptions();
$options['argument'] = array('default' => ''); $options['argument'] = array('default' => '');
...@@ -30,6 +33,9 @@ protected function defineOptions() { ...@@ -30,6 +33,9 @@ protected function defineOptions() {
return $options; return $options;
} }
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) { public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state); parent::buildOptionsForm($form, $form_state);
$form['argument'] = array( $form['argument'] = array(
...@@ -40,7 +46,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { ...@@ -40,7 +46,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
} }
/** /**
* Return the default argument. * {@inheritdoc}
*/ */
public function getArgument() { public function getArgument() {
return $this->options['argument']; return $this->options['argument'];
......
...@@ -74,6 +74,9 @@ public static function create(ContainerInterface $container, array $configuratio ...@@ -74,6 +74,9 @@ public static function create(ContainerInterface $container, array $configuratio
); );
} }
/**
* {@inheritdoc}
*/
protected function defineOptions() { protected function defineOptions() {
$options = parent::defineOptions(); $options = parent::defineOptions();
$options['index'] = array('default' => ''); $options['index'] = array('default' => '');
...@@ -82,6 +85,9 @@ protected function defineOptions() { ...@@ -82,6 +85,9 @@ protected function defineOptions() {
return $options; return $options;
} }
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) { public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state); parent::buildOptionsForm($form, $form_state);
$form['index'] = array( $form['index'] = array(
...@@ -102,6 +108,9 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { ...@@ -102,6 +108,9 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
); );
} }
/**
* {@inheritdoc}
*/
public function getArgument() { public function getArgument() {
$path = trim($this->currentPath->getPath($this->view->getRequest()), '/'); $path = trim($this->currentPath->getPath($this->view->getRequest()), '/');
if ($this->options['use_alias']) { if ($this->options['use_alias']) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment