You are here

public function TestFieldZeroFloat::build in Display Suite 8.4

Same name and namespace in other branches
  1. 8.2 tests/modules/ds_test/src/Plugin/DsField/TestFieldZeroFloat.php \Drupal\ds_test\Plugin\DsField\TestFieldZeroFloat::build()
  2. 8.3 tests/modules/ds_test/src/Plugin/DsField/TestFieldZeroFloat.php \Drupal\ds_test\Plugin\DsField\TestFieldZeroFloat::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/TestFieldZeroFloat.php, line 21

Class

TestFieldZeroFloat
Test field plugin that returns zero as a floating point number.

Namespace

Drupal\ds_test\Plugin\DsField

Code

public function build() {
  return [
    '#markup' => 0.0,
  ];
}