protected function ExtraFieldViewsPlugin::getViewArguments in Entity Extra Field 8
Same name and namespace in other branches
- 2.0.x src/Plugin/ExtraFieldType/ExtraFieldViewsPlugin.php \Drupal\entity_extra_field\Plugin\ExtraFieldType\ExtraFieldViewsPlugin::getViewArguments()
Get the view arguments.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity instance.
Return value
array An array of view arguments.
Throws
\Drupal\Component\Plugin\Exception\PluginNotFoundException
1 call to ExtraFieldViewsPlugin::getViewArguments()
- ExtraFieldViewsPlugin::renderView in src/
Plugin/ ExtraFieldType/ ExtraFieldViewsPlugin.php - Render the view.
File
- src/
Plugin/ ExtraFieldType/ ExtraFieldViewsPlugin.php, line 189
Class
- ExtraFieldViewsPlugin
- Define extra field views plugin.
Namespace
Drupal\entity_extra_field\Plugin\ExtraFieldTypeCode
protected function getViewArguments(EntityInterface $entity) {
$configuration = $this
->getConfiguration();
if (!isset($configuration['arguments']) || empty($configuration['arguments'])) {
return [];
}
$arguments = array_filter(explode(',', $configuration['arguments']));
foreach ($arguments as &$argument) {
$argument = $this
->processEntityToken($argument, $entity);
}
return $arguments;
}