FieldCreateCommand
final class FieldCreateCommand extends Command (View source)
Create a new 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
| protected InputInterface | $input | from IoTrait | |
| EntityTypeBundleInfoInterface | $entityTypeBundleInfo | from EntityTypeBundleAskTrait | |
| EntityTypeManagerInterface | $entityTypeManager | from EntityTypeBundleValidationTrait | |
| protected OutputInterface | $output | from IoTrait | |
| protected DrushStyle | $io | from IoTrait |
Methods
No description
Instantiates a new instance of the implementing class using autowiring.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
protected array
getFieldableEntityTypes()
No description
protected string|null
askEntityType()
No description
protected string|null
askBundle()
No description
protected void
validateEntityType(string $entityTypeId)
No description
protected void
validateBundle(string $entityTypeId, string $bundle)
No description
static AutowireTrait
create(ContainerInterface $container)
Instantiates a new instance of the implementing class using autowiring.
DrushStyle
setIo(InputInterface $input, OutputInterface $output)
No description
DrushStyle
io()
No description
protected InputInterface
input()
No description
protected OutputInterface
output()
No description
protected void
ensureIo()
No description
__construct(FieldTypePluginManagerInterface $fieldTypePluginManager, WidgetPluginManager $widgetPluginManager, EntityTypeManagerInterface $entityTypeManager, EntityTypeBundleInfoInterface $entityTypeBundleInfo, ModuleHandlerInterface $moduleHandler, EntityFieldManagerInterface $entityFieldManager, EventDispatcherInterface $eventDispatcher, ContentTranslationManagerInterface|null $contentTranslationManager = null)
No description
protected void
configure()
No description
int
execute(InputInterface $input, OutputInterface $output)
No description
void
complete(CompletionInput $input, CompletionSuggestions $suggestions)
No description
protected string|null
askExistingFieldName()
No description
protected string
askFieldName()
No description
protected string
askFieldLabel()
No description
protected string|null
askFieldDescription()
No description
protected string
askFieldType()
No description
protected string|null
askFieldWidget()
No description
protected bool
askRequired()
No description
protected bool
askTranslatable()
No description
protected int
askCardinality()
No description
protected FieldConfigInterface
createField()
No description
protected FieldStorageConfigInterface
createFieldStorage()
No description
protected void
createFieldDisplay(string $context)
No description
protected EntityDisplayInterface|null
getEntityDisplay(string $context)
No description
protected void
logResult(FieldConfigInterface $field)
No description
protected string
generateFieldName(string $source, string $bundle)
No description
protected bool
fieldExists(string $fieldName, string $entityType, string $bundle)
No description
protected bool
fieldStorageExists(string $fieldName, string $entityType)
No description
protected array
getExistingFieldStorageOptions(string $entityType, string $bundle, bool $showMachineNames)
No description
protected bool
hasContentTranslation()
No description
protected void
ensureOption(string $name, callable $asker, bool $required)
No description
protected FieldDefinitionInterface|null
getExistingFieldForDefaults()
No description
protected EntityDisplayInterface|null
getExistingEntityDisplayForDefaults(string $context)
No description
protected string|null
getExistingBundleForDefaults()
No description