Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php declare(strict_types=1);

namespace App\EventSubscriber;

use Ibexa\Contracts\Core\Repository\Events\Content\CopyContentEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class MyEventSubcriber implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return [
CopyContentEvent::class => ['onCopyContent', 0],
];
}

public function onCopyContent(CopyContentEvent $event): void
{
// your implementation
}
}
22 changes: 1 addition & 21 deletions docs/api/event_reference/event_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<?php

namespace App\EventSubscriber;

use Ibexa\Contracts\Core\Repository\Events\Content\CopyContentEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class MyEventSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return [
CopyContentEvent::class => ['onCopyContent', 0],
];
}

public function onCopyContent(CopyContentEvent $event): void
{
// your implementation
}
}
[[= include_file('code_samples/api/public_php_api/src/EventSubscriber/MyEventSubcriber.php') =]]
```
7 changes: 0 additions & 7 deletions docs/api/php_api/php_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This API has been removed in 3.3


``` php
$user = $userService->loadUserByCredentials($username, $password);
$permissionResolver->setCurrentUserReference($user);
```

## Exception handling

PHP API uses [Exceptions](https://www.php.net/exceptions) to handle errors.
Expand Down
2 changes: 1 addition & 1 deletion docs/cdp/cdp_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/commerce/order_management/configure_order_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/commerce/payment/configure_payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/commerce/shipping_management/configure_shipment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/commerce/transactional_emails/transactional_emails.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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') =]]
```

Expand Down
Loading