diff --git a/code_samples/api/public_php_api/src/EventSubscriber/MyEventSubcriber.php b/code_samples/api/public_php_api/src/EventSubscriber/MyEventSubcriber.php new file mode 100644 index 0000000000..8a82af15e9 --- /dev/null +++ b/code_samples/api/public_php_api/src/EventSubscriber/MyEventSubcriber.php @@ -0,0 +1,21 @@ + ['onCopyContent', 0], + ]; + } + + public function onCopyContent(CopyContentEvent $event): void + { + // your implementation + } +} diff --git a/docs/api/event_reference/event_reference.md b/docs/api/event_reference/event_reference.md index 014b9afec0..aa3b1fdb1a 100644 --- a/docs/api/event_reference/event_reference.md +++ b/docs/api/event_reference/event_reference.md @@ -13,25 +13,5 @@ In most cases, two events are dispatched for every action, one before the action For example, copying a content item is connected with two events: `BeforeCopyContentEvent` and `CopyContentEvent`. ``` php - ['onCopyContent', 0], - ]; - } - - public function onCopyContent(CopyContentEvent $event): void - { - // your implementation - } -} +[[= include_file('code_samples/api/public_php_api/src/EventSubscriber/MyEventSubcriber.php') =]] ``` diff --git a/docs/api/php_api/php_api.md b/docs/api/php_api/php_api.md index 396238acd0..70780ce7a1 100644 --- a/docs/api/php_api/php_api.md +++ b/docs/api/php_api/php_api.md @@ -136,13 +136,6 @@ To identify as a different user, you need to use the `UserService` together with This isn't required in template functions or controller code, as the HTTP layer takes care of identifying the user, and automatically sets it in the repository. -If you want to identify a user with their credentials instead, provide them in the following way: - -``` php -$user = $userService->loadUserByCredentials($username, $password); -$permissionResolver->setCurrentUserReference($user); -``` - ## Exception handling PHP API uses [Exceptions](https://www.php.net/exceptions) to handle errors. diff --git a/docs/cdp/cdp_installation.md b/docs/cdp/cdp_installation.md index 25cf4d2573..73ba9dd5ae 100644 --- a/docs/cdp/cdp_installation.md +++ b/docs/cdp/cdp_installation.md @@ -23,7 +23,7 @@ To download it run: composer require ibexa/cdp ``` -Flex installs and activates the package. +Symfony Flex installs and activates the package. After an installation process is finished, go to `config/packages/security.yaml` and uncomment `ibexa_cdp` rule. ```yaml diff --git a/docs/commerce/order_management/configure_order_management.md b/docs/commerce/order_management/configure_order_management.md index 1909d304f0..05be3fa4ea 100644 --- a/docs/commerce/order_management/configure_order_management.md +++ b/docs/commerce/order_management/configure_order_management.md @@ -19,9 +19,9 @@ Each transition represents a separate order processing step. ### Default order processing configuration The default order processing workflow is called `ibexa_order`. -To see the default workflow configuration, in your project directory, go to: `vendor/Ibexa/order-management/src/bundle/Resources/config/prepend.yaml`. +To see the default workflow configuration, in your project directory, go to: `vendor/ibexa/order-management/src/bundle/Resources/config/prepend.yaml`. -The default workflow uses keys defined in `src/lib/Value/Status.php` file as place and transition names, for example, `PENDING_PLACE` translates into `pending`. +The default workflow uses keys defined in `Ibexa\OrderManagement\Value\Status` class as place and transition names, for example, `PENDING_PLACE` translates into `pending`. You can replace the default workflow configuration with a custom one if needed. diff --git a/docs/commerce/payment/configure_payment.md b/docs/commerce/payment/configure_payment.md index 5406210d08..1bb7cdc5b0 100644 --- a/docs/commerce/payment/configure_payment.md +++ b/docs/commerce/payment/configure_payment.md @@ -19,7 +19,7 @@ Each transition represents a separate payment step. ### Default payment workflow configuration The default payment workflow is called `ibexa_payment`. -To see the default workflow configuration, in your project directory, go to: `vendor/Ibexa/payment/src/bundle/Resources/config/prepend.yaml`. +To see the default workflow configuration, in your project directory, go to: `vendor/ibexa/payment/src/bundle/Resources/config/prepend.yaml`. You can replace the default workflow configuration with a custom one if needed. diff --git a/docs/commerce/shipping_management/configure_shipment.md b/docs/commerce/shipping_management/configure_shipment.md index 83a1fccd1d..9bc88d3915 100644 --- a/docs/commerce/shipping_management/configure_shipment.md +++ b/docs/commerce/shipping_management/configure_shipment.md @@ -22,7 +22,7 @@ The default fallback workflow is `ibexa_shipment`, which is prepended at bundle The default payment workflow configuration is called `ibexa_shipment`, you can replace it with your custom workflow identifier if needed. -To see the default workflow, in your project directory, navigate to the following file: `vendor/Ibexa/shipping/src/bundle/Resources/config/workflow.yaml`. +To see the default workflow, in your project directory, navigate to the following file: `vendor/ibexa/shipping/src/bundle/Resources/config/workflow.yaml`. ### Custom shipment workflows diff --git a/docs/commerce/transactional_emails/transactional_emails.md b/docs/commerce/transactional_emails/transactional_emails.md index f105227714..673a2dc3a3 100644 --- a/docs/commerce/transactional_emails/transactional_emails.md +++ b/docs/commerce/transactional_emails/transactional_emails.md @@ -36,7 +36,7 @@ Transactional email support comes as an additional package that needs to be down composer require ibexa/connector-actito ``` -Flex installs and activates the package. +Symfony Flex installs and activates the package. ### Configure Actito integration diff --git a/docs/getting_started/troubleshooting.md b/docs/getting_started/troubleshooting.md index 35810d8dd7..53a4cf8dde 100644 --- a/docs/getting_started/troubleshooting.md +++ b/docs/getting_started/troubleshooting.md @@ -32,7 +32,7 @@ This more than doubles the length of the password, keeping entropy similar. If you have problems installing [[= product_name =]] on a system with limited RAM (for example 1GB or 2GB), enable swap. It allows your operating system to use the hard disk to supplement RAM when it runs out. -With swap enabled you're able to successfully run `php -d memory_limit=-1 bin/console ibexa:install --env prod ezplatform-clean`. +With swap enabled you're able to successfully run `php -d memory_limit=-1 bin/console ibexa:install`. When a system runs out of RAM, you may see `Killed` when trying to clear the cache (for example, `php bin/console --env=prod cache:clear` from your project's root directory). diff --git a/docs/tutorials/beginner_tutorial/img/bike_tutorial_homepage_install_clean.png b/docs/tutorials/beginner_tutorial/img/bike_tutorial_homepage_install_clean.png index d37d619212..76188ca59d 100644 Binary files a/docs/tutorials/beginner_tutorial/img/bike_tutorial_homepage_install_clean.png and b/docs/tutorials/beginner_tutorial/img/bike_tutorial_homepage_install_clean.png differ diff --git a/docs/tutorials/generic_field_type/3_create_form_for_point2d.md b/docs/tutorials/generic_field_type/3_create_form_for_point2d.md index a6df29922a..089839bf6d 100644 --- a/docs/tutorials/generic_field_type/3_create_form_for_point2d.md +++ b/docs/tutorials/generic_field_type/3_create_form_for_point2d.md @@ -11,8 +11,7 @@ Next, add a `Point2DType` class that extends the `AbstractType` and implements t This method adds fields for `x` and `y` coordinates. ```php -[[= include_file('code_samples/field_types/2dpoint_ft/steps/step_3/Point2DType.php', 0, 18) =]] -[[= include_file('code_samples/field_types/2dpoint_ft/steps/step_3/Point2DType.php', 25, 26) =]] +[[= include_file('code_samples/field_types/2dpoint_ft/steps/step_3/Point2DType.php', 0, 18) =]][[= include_file('code_samples/field_types/2dpoint_ft/steps/step_3/Point2DType.php', 25, 26) =]] ``` ## Add a Form Mapper Interface @@ -32,14 +31,14 @@ Next, implement a `mapFieldValueForm()` method and invoke `FormInterface::add` m Final version of the Type class should have the following statements and functions: -```php hl_lines="7 10 19 20 21 22 23 24 25 26" +```php hl_lines="7 10 19-26" [[= include_file('code_samples/field_types/2dpoint_ft/steps/step_3/Type.php') =]] ``` Finally, add a `configureOptions` method and set default value of `data_class` to `Value::class` in `src/Form/Type/Point2DType.php`. It allows your form to work on this object. -```php hl_lines="19 20 21 22 23 24" +```php hl_lines="20-25" [[= include_file('code_samples/field_types/2dpoint_ft/src/Form/Type/Point2DType.php') =]] ```