Unverified Commit c8afb674 authored by plach's avatar plach Committed by alexpott

Issue #2916780 by amateescu, timmillwood, alexpott: Rename to "workspaces"

(cherry picked from commit ab30572c)
parent 898169a6
......@@ -169,7 +169,7 @@
"drupal/views": "self.version",
"drupal/views_ui": "self.version",
"drupal/workflows": "self.version",
"drupal/workspace": "self.version"
"drupal/workspaces": "self.version"
},
"extra": {
"merge-plugin": {
......
......@@ -10,10 +10,10 @@
*/
function content_moderation_requirements($phase) {
$requirements = [];
if ($phase === 'install' && \Drupal::moduleHandler()->moduleExists('workspace')) {
$requirements['workspace_incompatibility'] = [
if ($phase === 'install' && \Drupal::moduleHandler()->moduleExists('workspaces')) {
$requirements['workspaces_incompatibility'] = [
'severity' => REQUIREMENT_ERROR,
'description' => t('Content Moderation can not be installed when Workspace is also installed.'),
'description' => t('Content Moderation can not be installed when Workspaces is also installed.'),
];
}
......
......@@ -4,7 +4,7 @@
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Core\Logger\RfcLogLevel;
use Drupal\workspace\Entity\Workspace;
use Drupal\workspaces\Entity\Workspace;
/**
* Install/uninstall core module and confirm table creation/deletion.
......@@ -150,7 +150,7 @@ public function testInstallUninstall() {
}
// Delete all workspaces before uninstall.
if ($name == 'workspace') {
if ($name == 'workspaces') {
$workspaces = Workspace::loadMultiple();
\Drupal::entityTypeManager()->getStorage('workspace')->delete($workspaces);
}
......
......@@ -4,7 +4,7 @@ dependencies:
config:
- core.entity_form_mode.workspace.deploy
module:
- workspace
- workspaces
id: workspace.workspace.deploy
targetEntityType: workspace
bundle: workspace
......
......@@ -2,7 +2,7 @@ langcode: en
status: true
dependencies:
module:
- workspace
- workspaces
id: workspace.deploy
label: Deploy
targetEntityType: workspace
......
/**
* @file
* Styling for the Workspace overview table.
* Styling for the Workspaces overview table.
*/
/** @todo Move to Seven theme before Workspace is marked stable. */
/** @todo Move to Seven theme before Workspaces is marked stable. */
tr.active-workspace {
background-color: #ebeae4;
}
/**
* @file
* Styling for Workspace module's toolbar tab.
* Styling for Workspaces module's toolbar tab.
*/
/**
* @todo Remove this after https://www.drupal.org/project/drupal/issues/2986056
* has been solved.
*/
.workspace-dialog #drupal-off-canvas * {
.workspaces-dialog #drupal-off-canvas * {
background: initial;
}
.workspace-dialog #drupal-off-canvas {
.workspaces-dialog #drupal-off-canvas {
background: #444;
}
/* Tab appearance. */
.toolbar .toolbar-bar .workspace-toolbar-tab {
.toolbar .toolbar-bar .workspaces-toolbar-tab {
float: right; /* LTR */
background-color: #e09600;
}
[dir="rtl"] .toolbar .toolbar-bar .workspace-toolbar-tab {
[dir="rtl"] .toolbar .toolbar-bar .workspaces-toolbar-tab {
float: left;
}
.toolbar .toolbar-bar .workspace-toolbar-tab--is-default {
.toolbar .toolbar-bar .workspaces-toolbar-tab--is-default {
background-color: #81C071;
}
.toolbar .toolbar-bar .workspace-toolbar-tab .toolbar-item {
.toolbar .toolbar-bar .workspaces-toolbar-tab .toolbar-item {
color: #000000;
margin: 0;
}
.toolbar .toolbar-icon-workspace:before {
background-image: url("../icons/000000/workspace.svg");
background-image: url("../icons/000000/workspaces.svg");
}
/* Off canvas dialog */
.workspace-dialog.ui-dialog-off-canvas a:focus {
.workspaces-dialog.ui-dialog-off-canvas a:focus {
outline:none;
}
.workspace-dialog.ui-dialog-off-canvas #drupal-off-canvas,
.workspace-dialog.ui-dialog-off-canvas {
.workspaces-dialog.ui-dialog-off-canvas #drupal-off-canvas,
.workspaces-dialog.ui-dialog-off-canvas {
background: #333333;
padding: 0;
}
.workspace-dialog.ui-widget.ui-widget-content {
.workspaces-dialog.ui-widget.ui-widget-content {
height: 100% !important;
}
.workspace-dialog.ui-dialog-off-canvas .ui-dialog-titlebar {
.workspaces-dialog.ui-dialog-off-canvas .ui-dialog-titlebar {
visibility: hidden;
position: relative;
}
.workspace-dialog.ui-dialog-off-canvas .ui-dialog-titlebar .ui-button {
.workspaces-dialog.ui-dialog-off-canvas .ui-dialog-titlebar .ui-button {
visibility: visible;
z-index: 101;
}
......@@ -175,12 +175,12 @@
}
}
.workspace-dialog.ui-dialog-off-canvas .ui-dialog-titlebar {
.workspaces-dialog.ui-dialog-off-canvas .ui-dialog-titlebar {
padding: 0;
top: 39px;
}
.workspace-dialog.ui-dialog-off-canvas .ui-dialog-titlebar-close {
.workspaces-dialog.ui-dialog-off-canvas .ui-dialog-titlebar-close {
right: 0.5em;
top: 1em;
}
......@@ -221,7 +221,7 @@
top: 27px;
}
.workspace-dialog.ui-widget.ui-widget-content {
.workspaces-dialog.ui-widget.ui-widget-content {
height: 161px !important;
}
......@@ -246,13 +246,13 @@
top: unset;
}
.workspace-dialog.ui-dialog-off-canvas .ui-dialog-titlebar {
.workspaces-dialog.ui-dialog-off-canvas .ui-dialog-titlebar {
top: 0;
}
.workspace-dialog.ui-dialog-off-canvas .ui-dialog-titlebar-close,
.workspace-dialog.ui-dialog-off-canvas .ui-dialog-titlebar-close:hover,
.workspace-dialog.ui-dialog-off-canvas .ui-dialog-titlebar-close:focus {
.workspaces-dialog.ui-dialog-off-canvas .ui-dialog-titlebar-close,
.workspaces-dialog.ui-dialog-off-canvas .ui-dialog-titlebar-close:hover,
.workspaces-dialog.ui-dialog-off-canvas .ui-dialog-titlebar-close:focus {
top: 1.5em;
}
......@@ -260,7 +260,7 @@
/* Make dialog width 100% for workspace mobile viewports. */
@media all and (max-width: 48em) {
.ui-dialog.workspace-dialog {
.ui-dialog.workspaces-dialog {
min-width: 100%;
max-width: 100%;
}
......
<?php
namespace Drupal\workspace\Entity;
namespace Drupal\workspaces\Entity;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityChangedTrait;
......@@ -9,7 +9,7 @@
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\user\UserInterface;
use Drupal\workspace\WorkspaceInterface;
use Drupal\workspaces\WorkspaceInterface;
/**
* The workspace entity class.
......@@ -25,18 +25,18 @@
* plural = "@count workspaces"
* ),
* handlers = {
* "list_builder" = "\Drupal\workspace\WorkspaceListBuilder",
* "access" = "Drupal\workspace\WorkspaceAccessControlHandler",
* "list_builder" = "\Drupal\workspaces\WorkspaceListBuilder",
* "access" = "Drupal\workspaces\WorkspaceAccessControlHandler",
* "route_provider" = {
* "html" = "\Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
* },
* "form" = {
* "default" = "\Drupal\workspace\Form\WorkspaceForm",
* "add" = "\Drupal\workspace\Form\WorkspaceForm",
* "edit" = "\Drupal\workspace\Form\WorkspaceForm",
* "delete" = "\Drupal\workspace\Form\WorkspaceDeleteForm",
* "activate" = "\Drupal\workspace\Form\WorkspaceActivateForm",
* "deploy" = "\Drupal\workspace\Form\WorkspaceDeployForm",
* "default" = "\Drupal\workspaces\Form\WorkspaceForm",
* "add" = "\Drupal\workspaces\Form\WorkspaceForm",
* "edit" = "\Drupal\workspaces\Form\WorkspaceForm",
* "delete" = "\Drupal\workspaces\Form\WorkspaceDeleteForm",
* "activate" = "\Drupal\workspaces\Form\WorkspaceActivateForm",
* "deploy" = "\Drupal\workspaces\Form\WorkspaceDeployForm",
* },
* },
* admin_permission = "administer workspaces",
......@@ -52,12 +52,12 @@
* "uid" = "uid",
* },
* links = {
* "add-form" = "/admin/config/workflow/workspace/add",
* "edit-form" = "/admin/config/workflow/workspace/manage/{workspace}/edit",
* "delete-form" = "/admin/config/workflow/workspace/manage/{workspace}/delete",
* "activate-form" = "/admin/config/workflow/workspace/manage/{workspace}/activate",
* "deploy-form" = "/admin/config/workflow/workspace/manage/{workspace}/deploy",
* "collection" = "/admin/config/workflow/workspace",
* "add-form" = "/admin/config/workflow/workspaces/add",
* "edit-form" = "/admin/config/workflow/workspaces/manage/{workspace}/edit",
* "delete-form" = "/admin/config/workflow/workspaces/manage/{workspace}/delete",
* "activate-form" = "/admin/config/workflow/workspaces/manage/{workspace}/activate",
* "deploy-form" = "/admin/config/workflow/workspaces/manage/{workspace}/deploy",
* "collection" = "/admin/config/workflow/workspaces",
* },
* )
*/
......@@ -92,7 +92,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
->setDescription(new TranslatableMarkup('The workspace owner.'))
->setRevisionable(TRUE)
->setSetting('target_type', 'user')
->setDefaultValueCallback('Drupal\workspace\Entity\Workspace::getCurrentUserId')
->setDefaultValueCallback('Drupal\workspaces\Entity\Workspace::getCurrentUserId')
->setDisplayOptions('form', [
'type' => 'entity_reference_autocomplete',
'weight' => 5,
......@@ -115,7 +115,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
* {@inheritdoc}
*/
public function publish() {
return \Drupal::service('workspace.operation_factory')->getPublisher($this)->publish();
return \Drupal::service('workspaces.operation_factory')->getPublisher($this)->publish();
}
/**
......@@ -183,7 +183,7 @@ public static function postDelete(EntityStorageInterface $storage, array $entiti
// Trigger a batch purge to allow empty workspaces to be deleted
// immediately.
\Drupal::service('workspace.manager')->purgeDeletedWorkspacesBatch();
\Drupal::service('workspaces.manager')->purgeDeletedWorkspacesBatch();
}
/**
......
<?php
namespace Drupal\workspace\Entity;
namespace Drupal\workspaces\Entity;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityTypeInterface;
......@@ -21,7 +21,7 @@
* plural = "@count workspace associations"
* ),
* handlers = {
* "storage" = "Drupal\workspace\WorkspaceAssociationStorage"
* "storage" = "Drupal\workspaces\WorkspaceAssociationStorage"
* },
* base_table = "workspace_association",
* revision_table = "workspace_association_revision",
......
<?php
namespace Drupal\workspace;
namespace Drupal\workspaces;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
......@@ -29,7 +29,7 @@ class EntityAccess implements ContainerInjectionInterface {
/**
* The workspace manager service.
*
* @var \Drupal\workspace\WorkspaceManagerInterface
* @var \Drupal\workspaces\WorkspaceManagerInterface
*/
protected $workspaceManager;
......@@ -38,7 +38,7 @@ class EntityAccess implements ContainerInjectionInterface {
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager service.
* @param \Drupal\workspace\WorkspaceManagerInterface $workspace_manager
* @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
* The workspace manager service.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager, WorkspaceManagerInterface $workspace_manager) {
......@@ -52,7 +52,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Wor
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity_type.manager'),
$container->get('workspace.manager')
$container->get('workspaces.manager')
);
}
......
<?php
namespace Drupal\workspace;
namespace Drupal\workspaces;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityInterface;
......@@ -29,7 +29,7 @@ class EntityOperations implements ContainerInjectionInterface {
/**
* The workspace manager service.
*
* @var \Drupal\workspace\WorkspaceManagerInterface
* @var \Drupal\workspaces\WorkspaceManagerInterface
*/
protected $workspaceManager;
......@@ -38,7 +38,7 @@ class EntityOperations implements ContainerInjectionInterface {
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager service.
* @param \Drupal\workspace\WorkspaceManagerInterface $workspace_manager
* @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
* The workspace manager service.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager, WorkspaceManagerInterface $workspace_manager) {
......@@ -52,7 +52,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Wor
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity_type.manager'),
$container->get('workspace.manager')
$container->get('workspaces.manager')
);
}
......@@ -121,9 +121,9 @@ public function entityLoad(array &$entities, $entity_type_id) {
public function entityPresave(EntityInterface $entity) {
$entity_type = $entity->getEntityType();
// Only run if this is not an entity type provided by the Workspace module
// Only run if this is not an entity type provided by the Workspaces module
// and we are in a non-default workspace
if ($entity_type->getProvider() === 'workspace' || $this->workspaceManager->getActiveWorkspace()->isDefaultWorkspace()) {
if ($entity_type->getProvider() === 'workspaces' || $this->workspaceManager->getActiveWorkspace()->isDefaultWorkspace()) {
return;
}
......@@ -152,7 +152,7 @@ public function entityPresave(EntityInterface $entity) {
// - An unpublished default revision in the default ('live') workspace.
// - A published pending revision in the current workspace.
if ($entity->isNew() && $entity->isPublished()) {
// Keep track of the publishing status for workspace_entity_insert() and
// Keep track of the publishing status for workspaces_entity_insert() and
// unpublish the default revision.
// @todo Remove this dynamic property once we have an API for associating
// temporary data with an entity: https://www.drupal.org/node/2896474.
......@@ -227,9 +227,9 @@ public function entityUpdate(EntityInterface $entity) {
public function entityPredelete(EntityInterface $entity) {
$entity_type = $entity->getEntityType();
// Only run if this is not an entity type provided by the Workspace module
// Only run if this is not an entity type provided by the Workspaces module
// and we are in a non-default workspace
if ($entity_type->getProvider() === 'workspace' || $this->workspaceManager->getActiveWorkspace()->isDefaultWorkspace()) {
if ($entity_type->getProvider() === 'workspaces' || $this->workspaceManager->getActiveWorkspace()->isDefaultWorkspace()) {
return;
}
......@@ -307,7 +307,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, $f
// For supported entity types, signal the fact that this form is safe to use
// in a non-default workspace.
// @see \Drupal\workspace\FormOperations::validateForm()
// @see \Drupal\workspaces\FormOperations::validateForm()
$form_state->set('workspace_safe', TRUE);
// Add an entity builder to the form which marks the edited entity object as
......@@ -320,7 +320,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, $f
$form['#entity_builders'][] = [$this, 'entityFormEntityBuild'];
}
/** @var \Drupal\workspace\WorkspaceAssociationStorageInterface $workspace_association_storage */
/** @var \Drupal\workspaces\WorkspaceAssociationStorageInterface $workspace_association_storage */
$workspace_association_storage = $this->entityTypeManager->getStorage('workspace_association');
if ($workspace_ids = $workspace_association_storage->getEntityTrackingWorkspaceIds($entity)) {
// An entity can only be edited in one workspace.
......
<?php
namespace Drupal\workspace\EntityQuery;
namespace Drupal\workspaces\EntityQuery;
use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\Query\QueryBase;
use Drupal\Core\Entity\Query\Sql\pgsql\QueryFactory as BaseQueryFactory;
use Drupal\workspace\WorkspaceManagerInterface;
use Drupal\workspaces\WorkspaceManagerInterface;
/**
* Workspace PostgreSQL specific entity query implementation.
* Workspaces PostgreSQL-specific entity query implementation.
*/
class PgsqlQueryFactory extends BaseQueryFactory {
/**
* The workspace manager.
*
* @var \Drupal\workspace\WorkspaceManagerInterface
* @var \Drupal\workspaces\WorkspaceManagerInterface
*/
protected $workspaceManager;
......@@ -25,7 +25,7 @@ class PgsqlQueryFactory extends BaseQueryFactory {
*
* @param \Drupal\Core\Database\Connection $connection
* The database connection used by the entity query.
* @param \Drupal\workspace\WorkspaceManagerInterface $workspace_manager
* @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
* The workspace manager.
*/
public function __construct(Connection $connection, WorkspaceManagerInterface $workspace_manager) {
......
<?php
namespace Drupal\workspace\EntityQuery;
namespace Drupal\workspaces\EntityQuery;
use Drupal\Core\Entity\Query\Sql\Query as BaseQuery;
......
<?php
namespace Drupal\workspace\EntityQuery;
namespace Drupal\workspaces\EntityQuery;
use Drupal\Core\Entity\Query\Sql\QueryAggregate as BaseQueryAggregate;
......@@ -20,7 +20,7 @@ public function prepare() {
// Aggregate entity queries do not return an array of entity IDs keyed by
// revision IDs, they only return the values of the aggregated fields, so we
// don't need to add any expressions like we do in
// \Drupal\workspace\EntityQuery\Query::prepare().
// \Drupal\workspaces\EntityQuery\Query::prepare().
$this->traitPrepare();
// Throw away the ID fields.
......
<?php
namespace Drupal\workspace\EntityQuery;
namespace Drupal\workspaces\EntityQuery;
use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\Query\QueryBase;
use Drupal\Core\Entity\Query\Sql\QueryFactory as BaseQueryFactory;
use Drupal\workspace\WorkspaceManagerInterface;
use Drupal\workspaces\WorkspaceManagerInterface;
/**
* Workspace specific entity query implementation.
* Workspaces-specific entity query implementation.
*/
class QueryFactory extends BaseQueryFactory {
/**
* The workspace manager.
*
* @var \Drupal\workspace\WorkspaceManagerInterface
* @var \Drupal\workspaces\WorkspaceManagerInterface
*/
protected $workspaceManager;
......@@ -25,7 +25,7 @@ class QueryFactory extends BaseQueryFactory {
*
* @param \Drupal\Core\Database\Connection $connection
* The database connection used by the entity query.
* @param \Drupal\workspace\WorkspaceManagerInterface $workspace_manager
* @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
* The workspace manager.
*/
public function __construct(Connection $connection, WorkspaceManagerInterface $workspace_manager) {
......
<?php
namespace Drupal\workspace\EntityQuery;
namespace Drupal\workspaces\EntityQuery;
use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\workspace\WorkspaceManagerInterface;
use Drupal\workspaces\WorkspaceManagerInterface;
/**
* Provides workspace-specific helpers for altering entity queries.
* Provides workspaces-specific helpers for altering entity queries.
*/
trait QueryTrait {
/**
* The workspace manager.
*
* @var \Drupal\workspace\WorkspaceManagerInterface
* @var \Drupal\workspaces\WorkspaceManagerInterface
*/
protected $workspaceManager;
......@@ -30,7 +30,7 @@ trait QueryTrait {
* The database connection to run the query against.
* @param array $namespaces
* List of potential namespaces of the classes belonging to this query.
* @param \Drupal\workspace\WorkspaceManagerInterface $workspace_manager
* @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
* The workspace manager.
*/
public function __construct(EntityTypeInterface $entity_type, $conjunction, Connection $connection, array $namespaces, WorkspaceManagerInterface $workspace_manager) {
......
<?php
namespace Drupal\workspace\EntityQuery;
namespace Drupal\workspaces\EntityQuery;
use Drupal\Core\Database\Query\SelectInterface;
use Drupal\Core\Entity\EntityType;
......@@ -15,7 +15,7 @@ class Tables extends BaseTables {
/**
* The workspace manager.
*
* @var \Drupal\workspace\WorkspaceManagerInterface
* @var \Drupal\workspaces\WorkspaceManagerInterface
*/
protected $workspaceManager;
......@@ -42,11 +42,12 @@ class Tables extends BaseTables {
public function __construct(SelectInterface $sql_query) {
parent::__construct($sql_query);
$this->workspaceManager = \Drupal::service('workspace.manager');
$this->workspaceManager = \Drupal::service('workspaces.manager');
// The join between the first 'workspace_association' table and base table
// of the query is done \Drupal\workspace\EntityQuery\QueryTrait::prepare(),
// so we need to initialize its entry manually.
// of the query is done in
// \Drupal\workspaces\EntityQuery\QueryTrait::prepare(), so we need to
// initialize its entry manually.
if ($this->sqlQuery->getMetaData('active_workspace_id')) {
$this->contentWorkspaceTables['base_table'] = 'workspace_association';
$this->baseTablesEntityType['base_table'] = $this->sqlQuery->getMetaData('entity_type');
......
<?php
namespace Drupal\workspace;
namespace Drupal\workspaces;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
......@@ -26,7 +26,7 @@ class EntityTypeInfo implements ContainerInjectionInterface {
/**
* The workspace manager service.
*
* @var \Drupal\workspace\WorkspaceManagerInterface
* @var \Drupal\workspaces\WorkspaceManagerInterface
*/
protected $workspaceManager;
......@@ -35,7 +35,7 @@ class EntityTypeInfo implements ContainerInjectionInterface {
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager service.
* @param \Drupal\workspace\WorkspaceManagerInterface $workspace_manager
* @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
* The workspace manager service.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager, WorkspaceManagerInterface $workspace_manager) {
......@@ -49,7 +49,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Wor
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity_type.manager'),
$container->get('workspace.manager')
$container->get('workspaces.manager')
);
}
......
<?php
namespace Drupal\workspace\Form;
namespace Drupal\workspaces\Form;
use Drupal\Core\Entity\EntityConfirmFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Messenger\MessengerInterface;
use Drupal\workspace\WorkspaceAccessException;
use Drupal\workspace\WorkspaceManagerInterface;
use Drupal\workspaces\WorkspaceAccessException;
use Drupal\workspaces\WorkspaceManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -17,14 +17,14 @@ class WorkspaceActivateForm extends EntityConfirmFormBase implements WorkspaceFo
/**
* The workspace entity.
*
* @var \Drupal\workspace\WorkspaceInterface
* @var \Drupal\workspaces\WorkspaceInterface
*/
protected $entity;
/**
* The workspace replication manager.
*
* @var \Drupal\workspace\WorkspaceManagerInterface
* @var \Drupal\workspaces\WorkspaceManagerInterface
*/
protected $workspaceManager;
......@@ -38,7 +38,7 @@ class WorkspaceActivateForm extends EntityConfirmFormBase implements WorkspaceFo
/**
* Constructs a new WorkspaceActivateForm.
*
* @param \Drupal\workspace\WorkspaceManagerInterface $workspace_manager
* @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
* The workspace manager.
* @param \Drupal\Core\Messenger\MessengerInterface $messenger
* The messenger service.
......@@ -53,7 +53,7 @@ public function __construct(WorkspaceManagerInterface $workspace_manager, Messen
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('workspace.manager'),
$container->get('workspaces.manager'),
$container->get('messenger')
);
}
......
<?php
namespace Drupal\workspace\Form;
namespace Drupal\workspaces\Form;
use Drupal\Core\Entity\ContentEntityDeleteForm;
use Drupal\Core\Form\FormStateInterface;
......@@ -15,7 +15,7 @@ class WorkspaceDeleteForm extends ContentEntityDeleteForm implements WorkspaceFo
/**
* The workspace entity.
*
* @var \Drupal\workspace\WorkspaceInterface
* @var \Drupal\workspaces\WorkspaceInterface
*/
protected $entity;
......
<?php
namespace Drupal\workspace\Form;
namespace Drupal\workspaces\Form;
use Drupal\Component\Datetime\TimeInterface;
use Drupal\Core\Entity\ContentEntityForm;
......@@ -8,7 +8,7 @@
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;