class FieldTest in Drupal 10
Same name in this branch
- 10 core/modules/quickedit/tests/src/FunctionalJavascript/FieldTest.php \Drupal\Tests\quickedit\FunctionalJavascript\FieldTest
- 10 core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php \Drupal\Tests\views\Unit\Plugin\field\FieldTest
- 10 core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php \Drupal\Tests\views\FunctionalJavascript\Plugin\views\Handler\FieldTest
- 10 core/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldTest.php \Drupal\views_test_data\Plugin\views\field\FieldTest
- 10 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php \Drupal\Tests\field\Kernel\Plugin\migrate\source\d6\FieldTest
- 10 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php \Drupal\Tests\field\Kernel\Plugin\migrate\source\d7\FieldTest
Same name and namespace in other branches
- 8 core/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldTest.php \Drupal\views_test_data\Plugin\views\field\FieldTest
- 9 core/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldTest.php \Drupal\views_test_data\Plugin\views\field\FieldTest
Plugin annotation
@ViewsField("test_field");Hierarchy
- class \Drupal\views_test_data\Plugin\views\field\FieldTest extends \Drupal\views\Plugin\views\field\FieldPluginBase
Expanded class hierarchy of FieldTest
File
- core/modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ field/ FieldTest.php, line 11 
Namespace
Drupal\views_test_data\Plugin\views\fieldView source
class FieldTest extends FieldPluginBase {
  /**
   * A temporary stored test value for the test.
   *
   * @var string
   */
  protected $testValue;
  /**
   * Sets the testValue property.
   *
   * @param string $value
   *   The test value to set.
   */
  public function setTestValue($value) {
    $this->testValue = $value;
  }
  /**
   * Returns the testValue property.
   *
   * @return string
   */
  public function getTestValue() {
    return $this->testValue;
  }
  /**
   * {@inheritdoc}
   */
  protected function addSelfTokens(&$tokens, $item) {
    $tokens['{{ test_token }}'] = $this
      ->getTestValue();
  }
  /**
   * {@inheritdoc}
   */
  public function render(ResultRow $values) {
    return $this
      ->sanitizeValue($this
      ->getTestValue());
  }
  /**
   * A mock function which allows to call placeholder from public.
   *
   * @return string
   *   The result of the placeholder method.
   */
  public function getPlaceholder() {
    return $this
      ->placeholder();
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| FieldTest:: | protected | property | A temporary stored test value for the test. | |
| FieldTest:: | protected | function | ||
| FieldTest:: | public | function | A mock function which allows to call placeholder from public. | |
| FieldTest:: | public | function | Returns the testValue property. | |
| FieldTest:: | public | function | ||
| FieldTest:: | public | function | Sets the testValue property. | 
