class MultipleItemsFieldTest in Extra Field 8.2
Same name and namespace in other branches
- 8 tests/extra_field_test/src/Plugin/ExtraField/Display/MultipleItemsFieldTest.php \Drupal\extra_field_test\Plugin\ExtraField\Display\MultipleItemsFieldTest
Extra field Display for a field with multiple items output.
Plugin annotation
@ExtraFieldDisplay(
id = "multiple_text_test",
label = @Translation("Extra field with multiple text item"),
description = @Translation("An extra field to display multiple text items."),
bundles = {
"node.first_node_type",
},
visible = true
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\extra_field\Plugin\ExtraFieldDisplayBase implements ExtraFieldDisplayInterface
- class \Drupal\extra_field\Plugin\ExtraFieldDisplayFormattedBase implements ExtraFieldDisplayFormattedInterface
- class \Drupal\extra_field_test\Plugin\ExtraField\Display\MultipleItemsFieldTest
- class \Drupal\extra_field\Plugin\ExtraFieldDisplayFormattedBase implements ExtraFieldDisplayFormattedInterface
- class \Drupal\extra_field\Plugin\ExtraFieldDisplayBase implements ExtraFieldDisplayInterface
Expanded class hierarchy of MultipleItemsFieldTest
1 file declares its use of MultipleItemsFieldTest
- ExtraFieldDisplayPluginTest.php in tests/
src/ Kernel/ ExtraFieldDisplayPluginTest.php
File
- tests/
extra_field_test/ src/ Plugin/ ExtraField/ Display/ MultipleItemsFieldTest.php, line 21
Namespace
Drupal\extra_field_test\Plugin\ExtraField\DisplayView source
class MultipleItemsFieldTest extends ExtraFieldDisplayFormattedBase {
/**
* {@inheritdoc}
*/
public function viewElements(ContentEntityInterface $entity) {
return [
[
'#markup' => 'Aap',
],
[
'#markup' => 'Noot',
],
[
'#markup' => 'Mies',
],
[
'#markup' => 'Wim',
],
[
'#markup' => 'Zus',
],
[
'#markup' => 'Jet',
],
];
}
}