You are here

public function TestMultipleField::build in Display Suite 8.4

Same name and namespace in other branches
  1. 8.2 tests/modules/ds_test/src/Plugin/DsField/TestMultipleField.php \Drupal\ds_test\Plugin\DsField\TestMultipleField::build()
  2. 8.3 tests/modules/ds_test/src/Plugin/DsField/TestMultipleField.php \Drupal\ds_test\Plugin\DsField\TestMultipleField::build()

Renders a field.

Return value

array A renderable array representing the content of the field.

Overrides DsFieldBase::build

File

tests/modules/ds_test/src/Plugin/DsField/TestMultipleField.php, line 21

Class

TestMultipleField
Test field plugin.

Namespace

Drupal\ds_test\Plugin\DsField

Code

public function build() {
  return [
    0 => [
      '#markup' => 'Test row one of multiple field plugin on node ' . $this
        ->entity()
        ->id(),
    ],
    1 => [
      '#markup' => 'Test row two of multiple field plugin on node ' . $this
        ->entity()
        ->id(),
    ],
  ];
}