From 7656b7a56f5727e25d8f460658bd0f76d0623d84 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 11 Jul 2024 08:52:47 +0200 Subject: [PATCH 1/5] Upgrade vhost to current supported PHP version (#812) --- cookbook/web-server/nginx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/web-server/nginx.rst b/cookbook/web-server/nginx.rst index fadfd430..52710973 100644 --- a/cookbook/web-server/nginx.rst +++ b/cookbook/web-server/nginx.rst @@ -37,7 +37,7 @@ The Nginx configuration could look something like. # pass the PHP scripts to FastCGI server from upstream phpfcgi location ~ ^/(index|config)\.php(/|$) { - fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; From 9244a523d4e49cf48df6f6eb3be45972b1c76e47 Mon Sep 17 00:00:00 2001 From: Prokyonn Date: Thu, 11 Jul 2024 13:26:00 +0200 Subject: [PATCH 2/5] Add admin view extension with refences table (#813) --- bundles/reference.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/bundles/reference.rst b/bundles/reference.rst index 83a24819..1c8319a7 100644 --- a/bundles/reference.rst +++ b/bundles/reference.rst @@ -59,3 +59,36 @@ Example implementation for a custom content-type: $propertyPrefix . $property->getName() ); } + +Extending the Admin View with a References Table +------------------------------------------------ + +To extend the admin view by adding a references table, follow these steps: + + 1. Inject the `ReferenceViewBuilderFactoryInterface`: Inject this interface into your custom Admin class. This will allow you to utilize the necessary methods to create the references view. + 2. Create the Reference List View: Use the `createReferenceListViewBuilder` method to create the list view for the references table. + +Here’s an example implementation from the `SnippetAdmin` class, demonstrating how to add the references tab to your custom admin view: + +.. code-block:: php + + if ($this->referenceViewBuilderFactory->hasReferenceListPermission()) { + $viewCollection->add( + $this->referenceViewBuilderFactory + ->createReferenceListViewBuilder( + $insightsResourceTabViewName . '.reference', + '/references', + SnippetDocument::RESOURCE_KEY + ) + ->setParent($insightsResourceTabViewName) + ); + } + +The `hasReferenceListPermission` method ensures that the current user has permission to view the references list. +The `createReferenceListViewBuilder` method is used to create the view. It takes three parameters: + + - The name of the new view, usually appended with .reference to indicate it is a reference view. + - The URL path for the references table. + - The resource key identifies the type of resource being referenced. + +The setParent method sets the parent view to integrate the references table into the existing admin view. \ No newline at end of file From 2b0050bbbf0a464df4241b9545ee36e2879f6737 Mon Sep 17 00:00:00 2001 From: Prokyonn Date: Tue, 16 Jul 2024 11:40:17 +0200 Subject: [PATCH 3/5] Add admin view extension with activity table (#814) --- bundles/activity.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/bundles/activity.rst b/bundles/activity.rst index 6c525cf2..51273d2c 100644 --- a/bundles/activity.rst +++ b/bundles/activity.rst @@ -187,6 +187,39 @@ users with a ``view`` permission for the context: } } +Extending the Admin View with a Activity Table +------------------------------------------------ + +To extend the admin view by adding a activities table, follow these steps: + + 1. Inject the `ActivityViewBuilderFactoryInterface`: Inject this interface into your custom Admin class. This will allow you to utilize the necessary methods to create the activities view. + 2. Create the Activity List View: Use the `createActivityListViewBuilder` method to create the list view for the activities table. + +Here’s an example implementation, demonstrating how to add the activities tab to your custom admin view, for further examples take a look at the SnippetAdmin class: + +.. code-block:: php + + if ($this->activityViewBuilderFactory->hasActivityListPermission()) { + $viewCollection->add( + $this->activityViewBuilderFactory + ->createActivityListViewBuilder( + $insightsResourceTabViewName . '.activity', + '/activities', + CustomEntity::RESOURCE_KEY + ) + ->setParent($insightsResourceTabViewName) + ); + } + +The `hasActivityListPermission` method ensures that the current user has permission to view the activities list. +The `createActivityListViewBuilder` method is used to create the view. It takes three parameters: + + - The name of the new view, usually appended with .activity to indicate it is an activity view. + - The URL path for the activities table. + - The resource key identifies the type of resource for the activities. + +The setParent method sets the parent view to integrate the activities table into the existing admin view. + .. _Symfony event dispatcher: https://symfony.com/doc/current/event_dispatcher.html .. _DomainEvent class: https://github.com/sulu/sulu/blob/2.x/src/Sulu/Bundle/ActivityBundle/Domain/Event/DomainEvent.php .. _ActivityController class: https://github.com/sulu/sulu/blob/2.x/src/Sulu/Bundle/ActivityBundle/UserInterface/Controller/ActivityController.php#L377-L401 From 17d22367a552d127358bf286c5b67072ce0934fa Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 26 Sep 2024 17:56:03 +0200 Subject: [PATCH 4/5] Fix CI --- .github/workflows/build-docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index 6e54be82..1faf693c 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -23,7 +23,7 @@ jobs: - name: Sphinx Build run: sphinx-build -n -W --keep-going -b html -d _build/doctrees . _build/html - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v4 with: name: DocumentationHTML path: "_build/html" From aeb99fd1257d6a2756900a731d43f60d18a68bbb Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 26 Sep 2024 17:58:09 +0200 Subject: [PATCH 5/5] Fix CI (#817) --- .github/workflows/build-docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index 6e54be82..1faf693c 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -23,7 +23,7 @@ jobs: - name: Sphinx Build run: sphinx-build -n -W --keep-going -b html -d _build/doctrees . _build/html - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v4 with: name: DocumentationHTML path: "_build/html"