final class CreateEntityReferenceFieldListener (View source)

Traits

A copy of \Drupal\Core\DependencyInjection\AutowireTrait with first params' type hint changed.

Stores input, output and IO objects for easy access in commands.

Properties

EntityTypeManagerInterface $entityTypeManager from  EntityTypeBundleValidationTrait
protected InputInterface $input from  IoTrait
protected OutputInterface $output from  IoTrait
protected DrushStyle $io from  IoTrait

Methods

static AutowireTrait
create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

void
validateEntityType(string $entityTypeId)

No description

void
validateBundle(string $entityTypeId, string $bundle)

No description

DrushStyle
setIo(InputInterface $input, OutputInterface $output)

No description

from  IoTrait
DrushStyle
io()

No description

from  IoTrait
InputInterface
input()

No description

from  IoTrait
OutputInterface
output()

No description

from  IoTrait
void
ensureIo()

No description

from  IoTrait
__construct(EntityTypeManagerInterface $entityTypeManager, EntityTypeBundleInfoInterface $entityTypeBundleInfo, EntityFieldManagerInterface $entityFieldManager)

No description

string
getTargetType(InputInterface $input)

No description

array|null
getTargetBundles(InputInterface $input)

No description

string
askReferencedEntityType()

No description

array
askReferencedBundles(string $targetType)

No description

FieldDefinitionInterface|null
getExistingFieldForDefaults()

No description

string|null
getExistingBundleForDefaults()

No description

Details

static AutowireTrait create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

Parameters

ContainerInterface $container

The service container this instance should use.

Return Value

AutowireTrait

protected void validateEntityType(string $entityTypeId)

No description

Parameters

string $entityTypeId

Return Value

void

protected void validateBundle(string $entityTypeId, string $bundle)

No description

Parameters

string $entityTypeId
string $bundle

Return Value

void

DrushStyle setIo(InputInterface $input, OutputInterface $output)

No description

Parameters

InputInterface $input
OutputInterface $output

Return Value

DrushStyle

DrushStyle io()

No description

Return Value

DrushStyle

protected InputInterface input()

No description

Return Value

InputInterface

protected OutputInterface output()

No description

Return Value

OutputInterface

protected void ensureIo()

No description

Return Value

void

__construct(EntityTypeManagerInterface $entityTypeManager, EntityTypeBundleInfoInterface $entityTypeBundleInfo, EntityFieldManagerInterface $entityFieldManager)

No description

Parameters

EntityTypeManagerInterface $entityTypeManager
EntityTypeBundleInfoInterface $entityTypeBundleInfo
EntityFieldManagerInterface $entityFieldManager

void onConsoleDefinitionEvent(ConsoleDefinitionsEvent $event)

No description

Parameters

ConsoleDefinitionsEvent $event

Return Value

void

void onFieldConfigValues(FieldCreateFieldConfigValuesEvent $event)

No description

Parameters

FieldCreateFieldConfigValuesEvent $event

Return Value

void

void onFieldStorageConfigValues(FieldCreateFieldStorageConfigValuesEvent $event)

No description

Parameters

FieldCreateFieldStorageConfigValuesEvent $event

Return Value

void

protected string getTargetType(InputInterface $input)

No description

Parameters

InputInterface $input

Return Value

string

protected array|null getTargetBundles(InputInterface $input)

No description

Parameters

InputInterface $input

Return Value

array|null

protected string askReferencedEntityType()

No description

Return Value

string

protected array askReferencedBundles(string $targetType)

No description

Parameters

string $targetType

Return Value

array

protected FieldDefinitionInterface|null getExistingFieldForDefaults()

No description

Return Value

FieldDefinitionInterface|null

protected string|null getExistingBundleForDefaults()

No description

Return Value

string|null