FieldStorageConfigListBuilder::__construct

public FieldStorageConfigListBuilder::__construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, FieldTypePluginManagerInterface $field_type_manager, EntityTypeBundleInfoInterface $bundle_info_service)

Constructs a new FieldStorageConfigListBuilder object.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.

\Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager: The 'field type' plugin manager.

Overrides EntityListBuilder::__construct

File

core/modules/field_ui/src/FieldStorageConfigListBuilder.php, line 59

Class

FieldStorageConfigListBuilder
Defines a class to build a listing of fields.

Namespace

Drupal\field_ui

Code

public function __construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, FieldTypePluginManagerInterface $field_type_manager, EntityTypeBundleInfoInterface $bundle_info_service) {
  parent::__construct($entity_type, $entity_manager->getStorage($entity_type->id()));

  $this->entityManager = $entity_manager;
  $this->bundles = $bundle_info_service->getAllBundleInfo();
  $this->fieldTypeManager = $field_type_manager;
  $this->fieldTypes = $this->fieldTypeManager->getDefinitions();
}
doc_Drupal
2016-10-29 09:12:35
Comments
Leave a Comment

Please login to continue.