From 22da78360bd0d361c3a866b8937e9adec7defb57 Mon Sep 17 00:00:00 2001
From: Robert Swoboda <53216935+Gengar-i@users.noreply.github.com>
Date: Wed, 6 Mar 2024 10:47:29 +0100
Subject: [PATCH] Removed dashboard check from admin-ui
---
.../translations/ibexa_menu.en.xliff | 15 ++++++
.../Menu/ContentRightSidebarLabelFactory.php | 3 +-
.../ContentTypeIsDashboardContainer.php | 48 -------------------
3 files changed, 17 insertions(+), 49 deletions(-)
delete mode 100644 src/lib/Specification/ContentType/ContentTypeIsDashboardContainer.php
diff --git a/src/bundle/Resources/translations/ibexa_menu.en.xliff b/src/bundle/Resources/translations/ibexa_menu.en.xliff
index 29968808bf..4406079db3 100644
--- a/src/bundle/Resources/translations/ibexa_menu.en.xliff
+++ b/src/bundle/Resources/translations/ibexa_menu.en.xliff
@@ -471,6 +471,21 @@
Save and close
key: section_edit__sidebar_right__save_and_close
+
+
+ Create
+ key: sidebar_right.create
+
+
+
+ Create content
+ key: sidebar_right.create_content
+
+
+
+ Create user
+ key: sidebar_right.create_user
+
Empty Trash
diff --git a/src/lib/Menu/ContentRightSidebarLabelFactory.php b/src/lib/Menu/ContentRightSidebarLabelFactory.php
index 6216e7a50e..e5560bbf02 100644
--- a/src/lib/Menu/ContentRightSidebarLabelFactory.php
+++ b/src/lib/Menu/ContentRightSidebarLabelFactory.php
@@ -13,8 +13,9 @@
use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType;
use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
use JMS\TranslationBundle\Model\Message;
+use JMS\TranslationBundle\Translation\TranslationContainerInterface;
-final class ContentRightSidebarLabelFactory implements ContentRightSidebarLabelFactoryInterface
+final class ContentRightSidebarLabelFactory implements ContentRightSidebarLabelFactoryInterface, TranslationContainerInterface
{
public const CREATE = 'sidebar_right.create';
public const CREATE_CONTENT = 'sidebar_right.create_content';
diff --git a/src/lib/Specification/ContentType/ContentTypeIsDashboardContainer.php b/src/lib/Specification/ContentType/ContentTypeIsDashboardContainer.php
deleted file mode 100644
index bbfe81998c..0000000000
--- a/src/lib/Specification/ContentType/ContentTypeIsDashboardContainer.php
+++ /dev/null
@@ -1,48 +0,0 @@
-dashboardGroupContentTypeIdentifier = $dashboardGroupContentTypeIdentifier;
- }
-
- /**
- * Checks if $contentType is an existing User content.
- *
- * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType $contentType
- *
- * @return bool
- *
- * @throws \Ibexa\AdminUi\Exception\InvalidArgumentException
- */
- public function isSatisfiedBy($contentType): bool
- {
- if (!$contentType instanceof ContentType) {
- throw new InvalidArgumentException($contentType, sprintf('Must be an instance of %s', ContentType::class));
- }
- dump($this->dashboardGroupContentTypeIdentifier);
-
- return $contentType->identifier === $this->dashboardGroupContentTypeIdentifier;
- }
-}
-
-class_alias(ContentTypeIsDashboardContainer::class, 'EzSystems\EzPlatformAdminUi\Specification\ContentType\ContentTypeIsDashboardContainer');