function ActiveWorkspaceTestForm::create

Overrides FormBase::create

File

core/modules/workspaces/tests/modules/workspaces_test/src/Form/ActiveWorkspaceTestForm.php, line 36

Class

ActiveWorkspaceTestForm
Form for testing the active workspace.

Namespace

Drupal\workspaces_test\Form

Code

public static function create(ContainerInterface $container) : static {
  $instance = parent::create($container);
  $instance->workspaceManager = $container->get('workspaces.manager');
  $instance->keyValue = $container->get('keyvalue')
    ->get('ws_test');
  return $instance;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.