class EntityCommands extends DrushCommands (View source)

Traits

ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Properties

protected $entityTypeManager

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct(EntityTypeManagerInterface $entityTypeManager)

EntityCommands constructor.

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

delete(string $entity_type, string $ids = null, array $options = ['bundle' => self::REQ])

Delete content entities.

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct(EntityTypeManagerInterface $entityTypeManager)

EntityCommands constructor.

Parameters

EntityTypeManagerInterface $entityTypeManager

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

delete(string $entity_type, string $ids = null, array $options = ['bundle' => self::REQ])

Delete content entities.

To delete configuration entities, see config:delete command.

Parameters

string $entity_type An entity machine name.
string $ids A comma delimited list of Ids.
array $options

Exceptions

Exception