You are here

public static function EntityConfigSettingsForm::create in Acquia Content Hub 8

Instantiates a new instance of this class.

This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.

Overrides ConfigFormBase::create

File

src/Form/EntityConfigSettingsForm.php, line 101

Class

EntityConfigSettingsForm
Defines the form to configure the entity types and bundles to be exported.

Namespace

Drupal\acquia_contenthub\Form

Code

public static function create(ContainerInterface $container) {
  $entity_type_bundle_info_manager = $container
    ->get('entity_type.bundle.info');
  $entity_type_manager = $container
    ->get('entity_type.manager');
  $entity_display_repository = $container
    ->get('entity_display.repository');
  $entity_manager = $container
    ->get('acquia_contenthub.entity_manager');
  $role_storage = $entity_type_manager
    ->getStorage('user_role');
  $permission_handler = $container
    ->get('user.permissions');
  return new static($entity_type_manager, $entity_type_bundle_info_manager, $entity_display_repository, $entity_manager, $role_storage, $permission_handler);
}