function FieldPluginBase::getEntity
Same name in other branches
- 9 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getEntity()
- 10 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getEntity()
- 11.x core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getEntity()
Overrides FieldHandlerInterface::getEntity
17 calls to FieldPluginBase::getEntity()
- BulkForm::viewsForm in core/
modules/ views/ src/ Plugin/ views/ field/ BulkForm.php - Form constructor for the bulk form.
- CommentedEntity::getItems in core/
modules/ comment/ src/ Plugin/ views/ field/ CommentedEntity.php - Gets an array of items for the field.
- ContactLink::renderLink in core/
modules/ contact/ src/ Plugin/ views/ field/ ContactLink.php - Prepares the link to view a entity.
- EntityField::getItems in core/
modules/ views/ src/ Plugin/ views/ field/ EntityField.php - Gets an array of items for the field.
- EntityField::getValue in core/
modules/ views/ src/ Plugin/ views/ field/ EntityField.php - Gets the value that's supposed to be rendered.
File
-
core/
modules/ views/ src/ Plugin/ views/ field/ FieldPluginBase.php, line 402
Class
- FieldPluginBase
- Base class for views fields.
Namespace
Drupal\views\Plugin\views\fieldCode
public function getEntity(ResultRow $values) {
$relationship_id = $this->options['relationship'];
if ($relationship_id == 'none') {
return $values->_entity;
}
elseif (isset($values->_relationship_entities[$relationship_id])) {
return $values->_relationship_entities[$relationship_id];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.