protected function ColorboxFieldFormatterEntityreference::getUrl in Colorbox field formatter 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Field/FieldFormatter/ColorboxFieldFormatterEntityreference.php \Drupal\colorbox_field_formatter\Plugin\Field\FieldFormatter\ColorboxFieldFormatterEntityreference::getUrl()
Parameters
\Drupal\Core\Field\FieldItemInterface $item: One field item.
Return value
Throws
\Drupal\Core\Entity\EntityMalformedException
Overrides ColorboxFieldFormatter::getUrl
File
- src/
Plugin/ Field/ FieldFormatter/ ColorboxFieldFormatterEntityreference.php, line 43
Class
- ColorboxFieldFormatterEntityreference
- Plugin implementation of the 'colorbox_field_formatter' formatter for entityreferences.
Namespace
Drupal\colorbox_field_formatter\Plugin\Field\FieldFormatterCode
protected function getUrl(FieldItemInterface $item) : Url {
/** @noinspection PhpUndefinedFieldInspection */
return $item->entity
->toUrl();
}