Add a 'Save and activate' action when creating a new workspace.
4 unresolved threads
Closes #3278377
Merge request reports
Activity
47 47 } 48 48 49 /** 50 * Creates and activates a new Workspace through the UI. 51 * 52 * @param string $label 53 * The label of the workspace to create. 54 * @param string $id 55 * The ID of the workspace to create. 56 * @param string $parent 57 * (optional) The ID of the parent workspace. Defaults to '_none'. 58 * 59 * @return \Drupal\workspaces\WorkspaceInterface 60 * The workspace that was just created. 61 */ 62 protected function createAndActivateWorkspaceThroughUi($label, $id, $parent = '_none') { changed this line in version 4 of the diff
120 95 parent::flagViolations($violations, $form, $form_state); 121 96 } 122 97 98 /** 99 * {@inheritdoc} 100 */ 101 protected function actions(array $form, FormStateInterface $form_state) { changed this line in version 3 of the diff
49 } 27 protected WorkspaceManagerInterface $workspaceManager; 50 28 51 29 /** 52 30 * {@inheritdoc} 53 31 */ 54 32 public static function create(ContainerInterface $container) { 55 return new static( 56 $container->get('entity.repository'), 57 $container->get('messenger'), 58 $container->get('entity_type.bundle.info'), 59 $container->get('datetime.time') 60 ); 33 $instance = parent::create($container); 34 $instance->workspaceManager = $container->get('workspaces.manager'); 35 return $instance; 120 95 parent::flagViolations($violations, $form, $form_state); 121 96 } 122 97 98 /** 99 * {@inheritdoc} 100 */ 101 protected function actions(array $form, FormStateInterface $form_state) { changed this line in version 3 of the diff
Please register or sign in to reply