You are here

function domain_entity_field_default_domains in Domain Access Entity 8

Returns default values for entity reference field with domains.

Parameters

\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity that contains field.

\Drupal\Core\Field\FieldDefinitionInterface $definition: The field of the domain entity access.

Return value

array Domains configured for the field.

1 string reference to 'domain_entity_field_default_domains'
DomainEntityMapper::addDomainField in src/DomainEntityMapper.php
Creates domain fields.

File

./domain_entity.module, line 62
Enables domain access for entities, and access query alter.

Code

function domain_entity_field_default_domains(FieldableEntityInterface $entity, FieldDefinitionInterface $definition) {
  return $definition
    ->getThirdPartySetting('domain_entity', 'domains', []);
}