public function DsFieldBase::getEntityTypeId in Display Suite 8.4
Same name and namespace in other branches
- 8.2 src/Plugin/DsField/DsFieldBase.php \Drupal\ds\Plugin\DsField\DsFieldBase::getEntityTypeId()
- 8.3 src/Plugin/DsField/DsFieldBase.php \Drupal\ds\Plugin\DsField\DsFieldBase::getEntityTypeId()
Gets the current entity type.
Return value
string The entity type ID.
Overrides DsFieldInterface::getEntityTypeId
3 calls to DsFieldBase::getEntityTypeId()
- Field::build in src/
Plugin/ DsField/ Field.php - Renders a field.
- SwitchField::settingsForm in modules/
ds_extras/ src/ Plugin/ DsField/ SwitchField.php - The form that holds the settings for this plugin.
- SwitchField::settingsSummary in modules/
ds_extras/ src/ Plugin/ DsField/ SwitchField.php - Returns the summary of the chosen settings.
File
- src/
Plugin/ DsField/ DsFieldBase.php, line 120
Class
- DsFieldBase
- Base class for all the ds plugins.
Namespace
Drupal\ds\Plugin\DsFieldCode
public function getEntityTypeId() {
if (isset($this->configuration['entity_type'])) {
return $this->configuration['entity_type'];
}
elseif ($entity = $this
->entity()) {
return $entity
->getEntityTypeId();
}
else {
return '';
}
}