You are here

TestFieldZeroString.php in Display Suite 8.4

File

tests/modules/ds_test/src/Plugin/DsField/TestFieldZeroString.php
View source
<?php

namespace Drupal\ds_test\Plugin\DsField;

use Drupal\ds\Plugin\DsField\DsFieldBase;

/**
 * Test field plugin that returns zero as a string.
 *
 * @DsField(
 *   id = "test_field_zero_string",
 *   title = @Translation("Test field plugin that returns zero as a string"),
 *   entity_type = "node"
 * )
 */
class TestFieldZeroString extends DsFieldBase {

  /**
   * {@inheritdoc}
   */
  public function build() {
    return [
      '#markup' => '0',
    ];
  }

}

Classes

Namesort descending Description
TestFieldZeroString Test field plugin that returns zero as a string.