You are here

public static function ContentHubDeleteClientConfirmForm::create in Acquia Content Hub 8.2

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 FormBase::create

File

src/Form/ContentHubDeleteClientConfirmForm.php, line 75

Class

ContentHubDeleteClientConfirmForm
Class ContentHubDeleteClientConfirmForm.

Namespace

Drupal\acquia_contenthub\Form

Code

public static function create(ContainerInterface $container) {

  /** @var \Drupal\acquia_contenthub\ContentHubConnectionManager $ch_connection_manager */
  $ch_connection_manager = $container
    ->get('acquia_contenthub.connection_manager');

  /** @var \Drupal\acquia_contenthub\Client\ClientFactory $client_factory */
  $client_factory = $container
    ->get('acquia_contenthub.client.factory');

  /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher */
  $event_dispatcher = $container
    ->get('event_dispatcher');
  return new static($ch_connection_manager, $client_factory, $event_dispatcher);
}