function ActiveWorkspaceTestForm::create
Same name and namespace in other branches
- 11.x core/modules/workspaces/tests/modules/workspaces_test/src/Form/ActiveWorkspaceTestForm.php \Drupal\workspaces_test\Form\ActiveWorkspaceTestForm::create()
Instantiates a new instance of the implementing class using autowiring.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.
Return value
static
Overrides AutowireTrait::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\FormCode
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.