ArgumentDefaultTest.php 932 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
<?php

/**
 * @file
 * Definition of Drupal\views_test_data\Plugin\views\argument_default\ArgumentDefaultTest.
 */

namespace Drupal\views_test_data\Plugin\views\argument_default;

use Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase;
11
use Drupal\Component\Annotation\Plugin;
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
use Drupal\Core\Annotation\Translation;

/**
 * Defines a argument default test plugin.
 *
 * @Plugin(
 *   id = "argument_default_test",
 *   title = @Translation("Argument default test")
 * )
 */
class ArgumentDefaultTest extends ArgumentDefaultPluginBase {

  /**
   * Overrides Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase::defineOptions().
   */
  protected function defineOptions() {
    $options = parent::defineOptions();
    $options['value'] = array('default' => '');

    return $options;
  }

  /**
35
   * {@inheritdoc}
36
   */
37
  public function getArgument() {
38 39 40 41
    return $this->options['value'];
  }

}