final class FieldDeleteCommand extends Command (View source)

Delete a field

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.

Constants

NAME

Properties

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

Methods

static AutowireTrait
create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

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
array
getFieldableEntityTypes()

No description

string|null
askEntityType()

No description

string|null
askBundle()

No description

void
validateEntityType(string $entityTypeId)

No description

void
validateBundle(string $entityTypeId, string $bundle)

No description

__construct(EntityTypeManagerInterface $entityTypeManager, EntityTypeBundleInfoInterface $entityTypeBundleInfo)

No description

void
configure()

No description

int
execute(InputInterface $input, OutputInterface $output)

No description

void
complete(CompletionInput $input, CompletionSuggestions $suggestions)

No description

string|null
askExisting(string $entityType, string|null $bundle)

No description

array
getFieldConfigs(string $entityType, string|null $bundle)

Returns all field configs for the given entity type and bundle.

void
deleteFieldConfig(FieldConfigInterface $fieldConfig)

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

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

protected array getFieldableEntityTypes()

No description

Return Value

array

protected string|null askEntityType()

No description

Return Value

string|null

protected string|null askBundle()

No description

Return Value

string|null

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

__construct(EntityTypeManagerInterface $entityTypeManager, EntityTypeBundleInfoInterface $entityTypeBundleInfo)

No description

Parameters

EntityTypeManagerInterface $entityTypeManager
EntityTypeBundleInfoInterface $entityTypeBundleInfo

protected void configure()

No description

Return Value

void

int execute(InputInterface $input, OutputInterface $output)

No description

Parameters

InputInterface $input
OutputInterface $output

Return Value

int

void complete(CompletionInput $input, CompletionSuggestions $suggestions)

No description

Parameters

CompletionInput $input
CompletionSuggestions $suggestions

Return Value

void

protected string|null askExisting(string $entityType, string|null $bundle)

No description

Parameters

string $entityType
string|null $bundle

Return Value

string|null

protected array getFieldConfigs(string $entityType, string|null $bundle)

Returns all field configs for the given entity type and bundle.

Parameters

string $entityType
string|null $bundle

Return Value

array

protected void deleteFieldConfig(FieldConfigInterface $fieldConfig)

No description

Parameters

FieldConfigInterface $fieldConfig

Return Value

void