Skip to content

Commit 3292fd2

Browse files
authored
[Misc] Various small fixes (#2809)
* [Misc] Various small fixes * PHP & JS CS Fixes * Adjusted screenshot
1 parent 32933fd commit 3292fd2

File tree

11 files changed

+32
-39
lines changed

11 files changed

+32
-39
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace App\EventSubscriber;
4+
5+
use Ibexa\Contracts\Core\Repository\Events\Content\CopyContentEvent;
6+
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
7+
8+
class MyEventSubcriber implements EventSubscriberInterface
9+
{
10+
public static function getSubscribedEvents()
11+
{
12+
return [
13+
CopyContentEvent::class => ['onCopyContent', 0],
14+
];
15+
}
16+
17+
public function onCopyContent(CopyContentEvent $event): void
18+
{
19+
// your implementation
20+
}
21+
}

docs/api/event_reference/event_reference.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,5 @@ In most cases, two events are dispatched for every action, one before the action
1313
For example, copying a content item is connected with two events: `BeforeCopyContentEvent` and `CopyContentEvent`.
1414

1515
``` php
16-
<?php
17-
18-
namespace App\EventSubscriber;
19-
20-
use Ibexa\Contracts\Core\Repository\Events\Content\CopyContentEvent;
21-
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
22-
23-
class MyEventSubscriber implements EventSubscriberInterface
24-
{
25-
public static function getSubscribedEvents()
26-
{
27-
return [
28-
CopyContentEvent::class => ['onCopyContent', 0],
29-
];
30-
}
31-
32-
public function onCopyContent(CopyContentEvent $event): void
33-
{
34-
// your implementation
35-
}
36-
}
16+
[[= include_file('code_samples/api/public_php_api/src/EventSubscriber/MyEventSubcriber.php') =]]
3717
```

docs/api/php_api/php_api.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,6 @@ To identify as a different user, you need to use the `UserService` together with
136136

137137
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.
138138

139-
If you want to identify a user with their credentials instead, provide them in the following way:
140-
141-
``` php
142-
$user = $userService->loadUserByCredentials($username, $password);
143-
$permissionResolver->setCurrentUserReference($user);
144-
```
145-
146139
## Exception handling
147140

148141
PHP API uses [Exceptions](https://www.php.net/exceptions) to handle errors.

docs/cdp/cdp_installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To download it run:
2323
composer require ibexa/cdp
2424
```
2525

26-
Flex installs and activates the package.
26+
Symfony Flex installs and activates the package.
2727
After an installation process is finished, go to `config/packages/security.yaml` and uncomment `ibexa_cdp` rule.
2828

2929
```yaml

docs/commerce/order_management/configure_order_management.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Each transition represents a separate order processing step.
1919
### Default order processing configuration
2020

2121
The default order processing workflow is called `ibexa_order`.
22-
To see the default workflow configuration, in your project directory, go to: `vendor/Ibexa/order-management/src/bundle/Resources/config/prepend.yaml`.
22+
To see the default workflow configuration, in your project directory, go to: `vendor/ibexa/order-management/src/bundle/Resources/config/prepend.yaml`.
2323

24-
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`.
24+
The default workflow uses keys defined in `Ibexa\OrderManagement\Value\Status` class as place and transition names, for example, `PENDING_PLACE` translates into `pending`.
2525

2626
You can replace the default workflow configuration with a custom one if needed.
2727

docs/commerce/payment/configure_payment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Each transition represents a separate payment step.
1919
### Default payment workflow configuration
2020

2121
The default payment workflow is called `ibexa_payment`.
22-
To see the default workflow configuration, in your project directory, go to: `vendor/Ibexa/payment/src/bundle/Resources/config/prepend.yaml`.
22+
To see the default workflow configuration, in your project directory, go to: `vendor/ibexa/payment/src/bundle/Resources/config/prepend.yaml`.
2323

2424
You can replace the default workflow configuration with a custom one if needed.
2525

docs/commerce/shipping_management/configure_shipment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The default fallback workflow is `ibexa_shipment`, which is prepended at bundle
2222

2323
The default payment workflow configuration is called `ibexa_shipment`, you can replace it with your custom workflow identifier if needed.
2424

25-
To see the default workflow, in your project directory, navigate to the following file: `vendor/Ibexa/shipping/src/bundle/Resources/config/workflow.yaml`.
25+
To see the default workflow, in your project directory, navigate to the following file: `vendor/ibexa/shipping/src/bundle/Resources/config/workflow.yaml`.
2626

2727
### Custom shipment workflows
2828

docs/commerce/transactional_emails/transactional_emails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Transactional email support comes as an additional package that needs to be down
3636
composer require ibexa/connector-actito
3737
```
3838

39-
Flex installs and activates the package.
39+
Symfony Flex installs and activates the package.
4040

4141
### Configure Actito integration
4242

docs/getting_started/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This more than doubles the length of the password, keeping entropy similar.
3232
If you have problems installing [[= product_name =]] on a system with limited RAM (for example 1GB or 2GB), enable swap.
3333
It allows your operating system to use the hard disk to supplement RAM when it runs out.
3434

35-
With swap enabled you're able to successfully run `php -d memory_limit=-1 bin/console ibexa:install --env prod ezplatform-clean`.
35+
With swap enabled you're able to successfully run `php -d memory_limit=-1 bin/console ibexa:install`.
3636

3737
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).
3838

866 KB
Loading

0 commit comments

Comments
 (0)