public function ExtraFieldViewsPlugin::build in Entity Extra Field 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/ExtraFieldType/ExtraFieldViewsPlugin.php \Drupal\entity_extra_field\Plugin\ExtraFieldType\ExtraFieldViewsPlugin::build()
Build the render array of the extra field type contents.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity type the extra field is being attached too.
\Drupal\Core\Entity\Display\EntityDisplayInterface $display: The entity display the extra field is apart of.
Return value
array The extra field renderable array.
Throws
\Drupal\Component\Plugin\Exception\PluginException
Overrides ExtraFieldTypePluginInterface::build
File
- src/
Plugin/ ExtraFieldType/ ExtraFieldViewsPlugin.php, line 95
Class
- ExtraFieldViewsPlugin
- Define extra field views plugin.
Namespace
Drupal\entity_extra_field\Plugin\ExtraFieldTypeCode
public function build(EntityInterface $entity, EntityDisplayInterface $display) : array {
return $this
->renderView($entity);
}