Skip to content

Commit efcd7a7

Browse files
Merge branch '2.6' of github.com:sulu/sulu-docs into 2.x
2 parents c04a950 + e57ca50 commit efcd7a7

File tree

4 files changed

+68
-2
lines changed

4 files changed

+68
-2
lines changed

.github/workflows/build-docs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Sphinx Build
2424
run: sphinx-build -n -W --keep-going -b html -d _build/doctrees . _build/html
2525

26-
- uses: actions/upload-artifact@v1
26+
- uses: actions/upload-artifact@v4
2727
with:
2828
name: DocumentationHTML
2929
path: "_build/html"

bundles/activity.rst

+33
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,39 @@ users with a ``view`` permission for the context:
187187
}
188188
}
189189
190+
Extending the Admin View with a Activity Table
191+
------------------------------------------------
192+
193+
To extend the admin view by adding a activities table, follow these steps:
194+
195+
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.
196+
2. Create the Activity List View: Use the `createActivityListViewBuilder` method to create the list view for the activities table.
197+
198+
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:
199+
200+
.. code-block:: php
201+
202+
if ($this->activityViewBuilderFactory->hasActivityListPermission()) {
203+
$viewCollection->add(
204+
$this->activityViewBuilderFactory
205+
->createActivityListViewBuilder(
206+
$insightsResourceTabViewName . '.activity',
207+
'/activities',
208+
CustomEntity::RESOURCE_KEY
209+
)
210+
->setParent($insightsResourceTabViewName)
211+
);
212+
}
213+
214+
The `hasActivityListPermission` method ensures that the current user has permission to view the activities list.
215+
The `createActivityListViewBuilder` method is used to create the view. It takes three parameters:
216+
217+
- The name of the new view, usually appended with .activity to indicate it is an activity view.
218+
- The URL path for the activities table.
219+
- The resource key identifies the type of resource for the activities.
220+
221+
The setParent method sets the parent view to integrate the activities table into the existing admin view.
222+
190223
.. _Symfony event dispatcher: https://symfony.com/doc/current/event_dispatcher.html
191224
.. _DomainEvent class: https://github.com/sulu/sulu/blob/2.x/src/Sulu/Bundle/ActivityBundle/Domain/Event/DomainEvent.php
192225
.. _ActivityController class: https://github.com/sulu/sulu/blob/2.x/src/Sulu/Bundle/ActivityBundle/UserInterface/Controller/ActivityController.php#L377-L401

bundles/reference.rst

+33
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,36 @@ Example implementation for a custom content-type:
5959
$propertyPrefix . $property->getName()
6060
);
6161
}
62+
63+
Extending the Admin View with a References Table
64+
------------------------------------------------
65+
66+
To extend the admin view by adding a references table, follow these steps:
67+
68+
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.
69+
2. Create the Reference List View: Use the `createReferenceListViewBuilder` method to create the list view for the references table.
70+
71+
Here’s an example implementation from the `SnippetAdmin` class, demonstrating how to add the references tab to your custom admin view:
72+
73+
.. code-block:: php
74+
75+
if ($this->referenceViewBuilderFactory->hasReferenceListPermission()) {
76+
$viewCollection->add(
77+
$this->referenceViewBuilderFactory
78+
->createReferenceListViewBuilder(
79+
$insightsResourceTabViewName . '.reference',
80+
'/references',
81+
SnippetDocument::RESOURCE_KEY
82+
)
83+
->setParent($insightsResourceTabViewName)
84+
);
85+
}
86+
87+
The `hasReferenceListPermission` method ensures that the current user has permission to view the references list.
88+
The `createReferenceListViewBuilder` method is used to create the view. It takes three parameters:
89+
90+
- The name of the new view, usually appended with .reference to indicate it is a reference view.
91+
- The URL path for the references table.
92+
- The resource key identifies the type of resource being referenced.
93+
94+
The setParent method sets the parent view to integrate the references table into the existing admin view.

cookbook/web-server/nginx.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The Nginx configuration could look something like.
3737
3838
# pass the PHP scripts to FastCGI server from upstream phpfcgi
3939
location ~ ^/(index|config)\.php(/|$) {
40-
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
40+
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
4141
fastcgi_split_path_info ^(.+\.php)(/.*)$;
4242
include fastcgi_params;
4343
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;

0 commit comments

Comments
 (0)