You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adjusted code samples for Notifications
* Extracted code sample
* Adjusted custom limitation example
* Revert "Adjusted code samples for Notifications"
This reverts commit a0555c7.
* Put Notification errors into the baseline
* PHP & JS CS Fixes
* Run Rector on CustomController
* Added AuthenticatedRememberedCheckTrait
* Fixed link
* Tested the Controller
Copy file name to clipboardExpand all lines: docs/permissions/custom_policies.md
+7-56Lines changed: 7 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,7 +174,7 @@ services:
174
174
175
175
#### Form mapper
176
176
177
-
To provide support for editing custom policies in the back office, you need to implement [`Ibexa\AdminUi\Limitation\LimitationFormMapperInterface`](https://github.com/ibexa/admin-ui/blob/4.5/src/lib/Limitation/LimitationFormMapperInterface.php).
177
+
To provide support for editing custom policies in the back office, you need to implement [`Ibexa\AdminUi\Limitation\LimitationFormMapperInterface`](https://github.com/ibexa/admin-ui/blob/5.0/src/lib/Limitation/LimitationFormMapperInterface.php).
178
178
179
179
-`mapLimitationForm` adds the limitation field as a child to a provided Symfony form.
180
180
-`getFormTemplate` returns the path to the template to use for rendering the limitation form. Here it use [`form_label`]([[= symfony_doc =]]/form/form_customization.html#reference-forms-twig-label) and [`form_widget`]([[= symfony_doc =]]/form/form_customization.html#reference-forms-twig-widget) to do so.
@@ -205,7 +205,7 @@ Some abstract limitation type form mapper classes are provided to help implement
205
205
206
206
#### Value mapper
207
207
208
-
By default, without a value mapper, the limitation value is rendered by using the block `ez_limitation_value_fallback` of the template [`vendor/ibexa/admin-ui/src/bundle/Resources/views/themes/admin/limitation/limitation_values.html.twig`](https://github.com/ibexa/admin-ui/blob/4.5/src/bundle/Resources/views/themes/admin/limitation/limitation_values.html.twig#L1-L6).
208
+
By default, without a value mapper, the limitation value is rendered by using the block `ibexa_limitation_value_fallback` of the template [`vendor/ibexa/admin-ui/src/bundle/Resources/views/themes/admin/limitation/limitation_values.html.twig`](https://github.com/ibexa/admin-ui/blob/v[[= latest_tag_5_0 =]]/src/bundle/Resources/views/themes/admin/limitation/limitation_values.html.twig).
209
209
210
210
To customize the rendering, a value mapper eventually transforms the limitation value and sends it to a custom template.
211
211
@@ -223,17 +223,17 @@ Then register the service with the `ibexa.admin_ui.limitation.mapper.value` tag
When a value mapper exists for a limitation, the rendering uses a Twig block named `ez_limitation_<lower_case_identifier>_value` where `<lower_case_identifier>` is the limitation identifier in lower case.
227
-
In this example, block name is `ez_limitation_customlimitation_value` as the identifier is `CustomLimitation`.
226
+
When a value mapper exists for a limitation, the rendering uses a Twig block named `ibexa_limitation_<lower_case_identifier>_value` where `<lower_case_identifier>` is the limitation identifier in lower case.
227
+
In this example, block name is `ibexa_limitation_customlimitation_value` as the identifier is `CustomLimitation`.
228
228
229
-
This template receives a `values` variable which is the return of the `mapLimitationValue` function from the corresponding value mapper.
229
+
This template receives a `values` variable which is the return value of the `mapLimitationValue` function from the corresponding value mapper.
message:'#^Method App\\Security\\Limitation\\Mapper\\CustomLimitationFormMapper\:\:mapLimitationForm\(\) has parameter \$form with generic interface Symfony\\Component\\Form\\FormInterface but does not specify its types\: TData$#'
message:'#^Return type \(bool\) of method App\\Security\\Limitation\\Mapper\\CustomLimitationValueMapper\:\:mapLimitationValue\(\) should be compatible with return type \(array\<mixed\>\) of method Ibexa\\AdminUi\\Limitation\\LimitationValueMapperInterface\:\:mapLimitationValue\(\)$#'
message:'#^Method App\\Block\\Attribute\\MyStringAttributeMapper\:\:map\(\) has parameter \$constraints with no value type specified in iterable type array\.$#'
0 commit comments