TestFieldZeroFloat.php in Display Suite 8.4
Same filename and directory in other branches
Namespace
Drupal\ds_test\Plugin\DsFieldFile
tests/modules/ds_test/src/Plugin/DsField/TestFieldZeroFloat.phpView source
<?php
namespace Drupal\ds_test\Plugin\DsField;
use Drupal\ds\Plugin\DsField\DsFieldBase;
/**
* Test field plugin that returns zero as a floating point number.
*
* @DsField(
* id = "test_field_zero_float",
* title = @Translation("Test field plugin that returns zero as a floating point number"),
* entity_type = "node"
* )
*/
class TestFieldZeroFloat extends DsFieldBase {
/**
* {@inheritdoc}
*/
public function build() {
return [
'#markup' => 0.0,
];
}
}
Classes
Name![]() |
Description |
---|---|
TestFieldZeroFloat | Test field plugin that returns zero as a floating point number. |