public function DomainCommands::getFieldEntities in Domain Access 8
Finds entities that reference a specific field.
Parameters
string $field_name: The field name to lookup.
Return value
string A comma-separated list of entities containing a specific field.
3 calls to DomainCommands::getFieldEntities()
- DomainAccessCommands::alterDomainInfo in domain_access/
src/ Commands/ DomainAccessCommands.php - Provides additional information to domain:info.
- DomainCommands::infoDomains in domain/
src/ Commands/ DomainCommands.php - List general information about the domains on the site.
- DomainSourceCommands::alterDomainInfo in domain_source/
src/ Commands/ DomainSourceCommands.php - Provides additional information to domain:info.
File
- domain/
src/ Commands/ DomainCommands.php, line 250
Class
- DomainCommands
- Drush commands for the domain module.
Namespace
Drupal\domain\CommandsCode
public function getFieldEntities($field_name) {
$this
->ensureEntityFieldMap();
$domain_entities = [];
foreach ($this->entityFieldMap as $type => $fields) {
if (array_key_exists($field_name, $fields)) {
$domain_entities[] = $type;
}
}
return implode(', ', $domain_entities);
}