Skip to content

Commit f8beb0f

Browse files
committed
More fixes
1 parent f08e7b7 commit f8beb0f

File tree

9 files changed

+58
-58
lines changed

9 files changed

+58
-58
lines changed

docs/ai_actions/extend_ai_actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ An example Action Handler combines the input data and the Action Type options an
233233
The language of the transcribed data is extracted from the Runtime Context for better results.
234234
The Action Type options provided in the Action Context dictate whether the timestamps will be removed before returning the result.
235235

236-
``` php hl_lines="66-68 52-55"
236+
``` php hl_lines="34-37 52-55"
237237
[[= include_file('code_samples/ai_actions/src/AI/Handler/WhisperAudioToTextActionHandler.php') =]]
238238
```
239239

docs/commerce/checkout/checkout_api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ From the developer's perspective, checkouts are referenced with an UUID identifi
2222
To access a single checkout, use the `CheckoutServiceInterface::getCheckout` method:
2323

2424
``` php
25-
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 32, 33) =]]
25+
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 26, 27) =]]
2626
```
2727

2828
## Get single checkout for specific cart
@@ -31,15 +31,15 @@ To fetch checkout for a cart that already exists, use the `CheckoutServiceInterf
3131
You can use it when you want to initiate the checkout process right after products are successfully added to a cart.
3232

3333
``` php
34-
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 26, 30) =]]
34+
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 20, 24) =]]
3535
```
3636

3737
## Create checkout
3838

3939
To create a checkout, use the `CheckoutServiceInterface::createCheckout` method and provide it with a `CheckoutCreateStruct` struct that contains a `CartInterface` object.
4040

4141
``` php
42-
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 35, 41) =]]
42+
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 29, 35) =]]
4343
```
4444

4545
## Update checkout
@@ -53,13 +53,13 @@ To update the checkout, use the `CheckoutServiceInterface::updateCheckout` metho
5353
All data is placed in session storage.
5454

5555
``` php
56-
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 43, 45) =]]
56+
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 37, 39) =]]
5757
```
5858

5959
## Delete checkout
6060

6161
To delete a checkout from the session, use the `CheckoutServiceInterface::deleteCheckout` method:
6262

6363
``` php
64-
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 47, 48) =]]
64+
[[= include_file('code_samples/api/commerce/src/Controller/CustomCheckoutController.php', 41, 42) =]]
6565
```

docs/commerce/payment/extend_payment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ When you create a payment, you can attach custom data to it, for example, you ca
9494
You add custom data by using the `setContext` method:
9595

9696
``` php
97-
[[= include_file('code_samples/api/commerce/src/Command/PaymentCommand.php', 80, 91) =]]
97+
[[= include_file('code_samples/api/commerce/src/Command/PaymentCommand.php', 81, 93) =]]
9898
```
9999

100100
Then, you retrieve it with the `getContext` method:

docs/commerce/shipping_management/shipment_api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ From the developer's perspective, shipments are referenced with a UUID identifie
1616
To access a single shipment by using its string identifier, use the `ShipmentService::getShipmentByIdentifier` method:
1717

1818
``` php
19-
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 73, 82) =]]
19+
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 57, 66) =]]
2020
```
2121

2222
### Get single shipment by id
2323

2424
To access a single shipment by using its numerical id, use the `ShipmentService::getShipment` method:
2525

2626
``` php
27-
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 61, 71) =]]
27+
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 45, 55) =]]
2828
```
2929

3030
## Get multiple shipments
@@ -33,15 +33,15 @@ To fetch multiple shipments, use the `ShipmentService::findShipments` method.
3333
It follows the same search query pattern as other APIs:
3434

3535
``` php
36-
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 84, 103) =]]
36+
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 68, 87) =]]
3737
```
3838

3939
## Create shipment
4040

4141
To create a shipment, use the `ShipmentService::createShipment` method and provide it with an `Ibexa\Contracts\Shipping\Value\ShipmentCreateStruct` object that takes two parameters, a `shippingMethod` string and a `Money` object.
4242

4343
``` php
44-
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 105, 119) =]]
44+
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 89, 103) =]]
4545
```
4646

4747
## Update shipment
@@ -51,13 +51,13 @@ You could do it to support a scenario when, for example, the shipment is process
5151
To update shipment information, use the `ShipmentService::updateShipment` method:
5252

5353
``` php
54-
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 121, 132) =]]
54+
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 105, 116) =]]
5555
```
5656
## Delete shipment
5757

5858
To delete a shipment from the system, use the `ShipmentService::deleteShipment` method:
5959

6060

6161
``` php
62-
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 134, 135) =]]
62+
[[= include_file('code_samples/api/commerce/src/Command/ShipmentCommand.php', 118, 119) =]]
6363
```

docs/commerce/shipping_management/shipping_method_api.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To access a shipping method by using its identifier, use the `ShippingMethodServ
1717
The method takes a string as `$identifier` parameter and uses a prioritized language from SiteAccess settings unless you pass another language as `forcedLanguage`.
1818

1919
``` php
20-
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 65, 75) =]]
20+
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 52, 62) =]]
2121
```
2222

2323
### Get shipping method by ID
@@ -26,7 +26,7 @@ To access a shipping method by using its ID, use the `ShippingMethodServiceInter
2626
The method takes a string as `$id` parameter and uses a prioritized language from SiteAccess settings unless you pass another language as `forcedLanguage`.
2727

2828
``` php
29-
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 53, 63) =]]
29+
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 40, 50) =]]
3030
```
3131

3232
## Get multiple shipping methods
@@ -35,37 +35,37 @@ To fetch multiple shipping methods, use the `ShippingMethodServiceInterface::get
3535
It follows the same search query pattern as other APIs:
3636

3737
``` php
38-
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 77, 95) =]]
38+
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 64, 82) =]]
3939
```
4040

4141
## Create shipping method
4242

4343
To create a shipping method, use the `ShippingMethodServiceInterface::createShippingMethod` method and provide it with the `Ibexa\Contracts\Shipping\Value\ShippingMethodCreateStruct` object that you created by using the `newShippingMethodCreateStruct` method.
4444

4545
``` php
46-
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 97, 120) =]]
46+
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 84, 107) =]]
4747
```
4848

4949
## Update shipping method
5050

5151
To update a shipping method, use the `ShippingMethodServiceInterface::updateShippingMethod` method and provide it with the `Ibexa\Contracts\Shipping\Value\ShippingMethodUpdateStruct` object that you created by using the `newShippingMethodUpdateStruct` method.
5252

5353
``` php
54-
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 122, 137) =]]
54+
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 109, 123) =]]
5555
```
5656

5757
## Delete shipping method
5858

5959
To update a shipping method, use the `ShippingMethodServiceInterface::deleteShippingMethod` method.
6060

6161
``` php
62-
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 138, 144) =]]
62+
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 125, 131) =]]
6363
```
6464

6565
## Delete shipping method translation
6666

6767
To delete shipping method translation, use the `ShippingMethodServiceInterface::deleteShippingMethodTranslation` method.
6868

6969
``` php
70-
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 146, 155) =]]
70+
[[= include_file('code_samples/api/commerce/src/Command/ShippingMethodCommand.php', 133, 142) =]]
7171
```

docs/content_management/data_migration/data_migration_api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ You can use the PHP API to manage and run [data migrations](data_migration.md).
1111
To list all migration files available in the directory defined in configuration (by default, `src/Migrations/Ibexa`), use the `MigrationService:listMigrations()` method:
1212

1313
``` php
14-
[[= include_file('code_samples/api/migration/src/Command/MigrationCommand.php', 35, 38) =]]
14+
[[= include_file('code_samples/api/migration/src/Command/MigrationCommand.php', 31, 34) =]]
1515
```
1616

1717
To get a single migration file by its name, use the `MigrationService:findOneByName()` method:
1818

1919
``` php
20-
[[= include_file('code_samples/api/migration/src/Command/MigrationCommand.php', 40, 41) =]]
20+
[[= include_file('code_samples/api/migration/src/Command/MigrationCommand.php', 35, 36) =]]
2121
```
2222

2323
## Running migration files
2424

2525
To run migration file(s), use either `MigrationService:executeOne()` or `MigrationService:executeAll()`:
2626

2727
``` php
28-
[[= include_file('code_samples/api/migration/src/Command/MigrationCommand.php', 42, 44) =]]
28+
[[= include_file('code_samples/api/migration/src/Command/MigrationCommand.php', 38, 40) =]]
2929
```
3030

3131
Both `executeOne()` and `executeAll()` can take an optional parameter: the login of the User that you want to execute the migrations as.
@@ -35,5 +35,5 @@ Both `executeOne()` and `executeAll()` can take an optional parameter: the login
3535
To add a new migration file, use the `MigrationService:add()` method:
3636

3737
``` php
38-
[[= include_file('code_samples/api/migration/src/Command/MigrationCommand.php', 28, 34) =]]
38+
[[= include_file('code_samples/api/migration/src/Command/MigrationCommand.php', 24, 30) =]]
3939
```

docs/pim/catalog_api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To get information about product catalogs and manage them, use `CatalogServiceIn
1111
To get a single catalog, use `Ibexa\Contracts\ProductCatalog\CatalogServiceInterface::getCatalog()` and provide it with catalog ID, or `CatalogServiceInterface::getCatalogByIdentifier()` and pass the identifier:
1212

1313
``` php
14-
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 81, 83) =]]
14+
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 68, 70) =]]
1515
```
1616

1717
## Get products in catalog
@@ -20,7 +20,7 @@ To get products from a catalog, request the product query from the catalog objec
2020
Then, create a new `ProductQuery` based on it and run a product search with `ProductServiceInterface::findProduct()`:
2121

2222
``` php
23-
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 85, 91) =]]
23+
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 72, 78) =]]
2424
```
2525

2626
## Create catalog
@@ -29,7 +29,7 @@ To create a catalog, you need to prepare a `CatalogCreateStruct` that contains:
2929
Then, pass this struct to `CatalogServiceInterface::createCatalog()`:
3030

3131
``` php
32-
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 71, 79) =]]
32+
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 51, 66) =]]
3333
```
3434

3535
## Update catalog
@@ -39,5 +39,5 @@ You must pass the catalog object and a `CatalogUpdateStruct` to the method.
3939
In the following example, you update the catalog to publish it:
4040

4141
``` php
42-
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 93, 97) =]]
42+
[[= include_file('code_samples/api/product_catalog/src/Command/CatalogCommand.php', 80, 84) =]]
4343
```

docs/pim/price_api.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ To access a currency object by its code, use `CurrencyServiceInterface::getCurre
1212
To access a whole list of currencies, use `CurrencyServiceInterface::findCurrencies`.
1313

1414
``` php
15-
[[= include_file('code_samples/api/product_catalog/src/Command/CurrencyCommand.php', 52, 61) =]]
15+
[[= include_file('code_samples/api/product_catalog/src/Command/CurrencyCommand.php', 42, 50) =]]
1616
```
1717

1818
To create a new currency, use `CurrencyServiceInterface::createCurrency()` and provide it with a `CurrencyCreateStruct` with code, number of fractional digits and a flag indicating if the currency is enabled:
1919

2020
``` php
21-
[[= include_file('code_samples/api/product_catalog/src/Command/CurrencyCommand.php', 67, 71) =]]
21+
[[= include_file('code_samples/api/product_catalog/src/Command/CurrencyCommand.php', 57, 60) =]]
2222
```
2323

2424
## Prices
@@ -28,34 +28,34 @@ To manage prices, use `ProductPriceService`.
2828
To retrieve the price of a product in the currency for the current context, use `Product::getPrice()`:
2929

3030
``` php
31-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 79, 82) =]]
31+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 60, 63) =]]
3232
```
3333

3434
To retrieve the price of a product in a specific currency, use `ProductPriceService::getPriceByProductAndCurrency`:
3535

3636
``` php
37-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 83, 86) =]]
37+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 64, 67) =]]
3838
```
3939

4040
To get all prices (in different currencies) for a given product, use `ProductPriceService::findPricesByProductCode`:
4141

4242
``` php
43-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 97, 103) =]]
43+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 78, 84) =]]
4444
```
4545

4646
To load price definitions that match given criteria, use `ProductPriceServiceInterface::findPrices`:
4747

4848
``` php
4949
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 12, 16) =]]
5050
// ...
51-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 104, 114) =]]
51+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 85, 95) =]]
5252
```
5353

5454
You can also use `ProductPriceService` to create or modify existing prices.
5555
For example, to create a new price for a given currency, use `ProductPriceService::createProductPrice` and provide it with a `ProductPriceCreateStruct` object:
5656

5757
``` php
58-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 79, 85) =]]
58+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 69, 75) =]]
5959
```
6060

6161
!!! note
@@ -80,7 +80,7 @@ To resolve a price of a product in the currency for the current context, use eit
8080
``` php
8181
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 7, 8) =]][[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 11, 12) =]]
8282
// ...
83-
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 115, 119) =]]
83+
[[= include_file('code_samples/api/product_catalog/src/Command/ProductPriceCommand.php', 96, 100) =]]
8484
```
8585

8686
## VAT
@@ -89,17 +89,17 @@ To get information about the VAT categories and rates configured in the system,
8989
VAT is configured per region, so you also need to use `RegionServiceInterface` to get the relevant region object.
9090

9191
``` php
92-
[[= include_file('code_samples/api/product_catalog/src/Command/VatCommand.php', 54, 55) =]]
92+
[[= include_file('code_samples/api/product_catalog/src/Command/VatCommand.php', 41, 42) =]]
9393
```
9494

9595
To get information about all VAT categories configured for the selected region, use `VatServiceInterface::getVatCategories()`:
9696

9797
``` php
98-
[[= include_file('code_samples/api/product_catalog/src/Command/VatCommand.php', 56, 61) =]]
98+
[[= include_file('code_samples/api/product_catalog/src/Command/VatCommand.php', 43, 48) =]]
9999
```
100100

101101
To get a single VAT category, use `VatServiceInterface::getVatCategoryByIdentifier()` and provide it with the region object and the identifier of the VAT category:
102102

103103
``` php
104-
[[= include_file('code_samples/api/product_catalog/src/Command/VatCommand.php', 62, 64) =]]
104+
[[= include_file('code_samples/api/product_catalog/src/Command/VatCommand.php', 49, 50) =]]
105105
```

0 commit comments

Comments
 (0)