public function EntityExtender::getRabbitHoleFields in Rabbit Hole 8
Same name and namespace in other branches
- 2.x src/EntityExtender.php \Drupal\rabbit_hole\EntityExtender::getRabbitHoleFields()
Return fields added by rabbit hole for use in entity_base_field_info hooks.
Parameters
string $entity_type_id: The string ID of the entity type.
Return value
array An array of general extra fields.
File
- src/
EntityExtender.php, line 48
Class
- EntityExtender
- Adds Rabbit Hole fields to supported entity types.
Namespace
Drupal\rabbit_holeCode
public function getRabbitHoleFields($entity_type_id) {
$entity_types = $this->rhEntityPluginManager
->loadSupportedEntityTypes();
if (in_array($entity_type_id, $entity_types)) {
return $this
->getGeneralExtraFields();
}
}