Skip to content

Commit fee654d

Browse files
committed
Remove include_file from converted example
1 parent 3f920d1 commit fee654d

3 files changed

Lines changed: 0 additions & 100 deletions

File tree

docs/administration/recent_activity/recent_activity.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ See [Activity Log Search Criteria reference](activity_log_criteria.md) and [Acti
8282
In the following example, log groups that contain at least one creation of a Content item are displayed in terminal, with a maximum of 10 groups within the last hour.
8383
It uses the default `admin` user that has a [permission](#permission-and-security) to list everyone's entries.
8484

85-
```php hl_lines="34-38"
86-
[[= include_file('code_samples/recent_activity/src/Command/MonitorRecentContentCreationCommand.php') =]]
87-
```
8885
```php hl_lines="34-38"
8986
[[= include_code('code_samples/recent_activity/src/Command/MonitorRecentContentCreationCommand.php') =]]
9087
```
@@ -145,9 +142,6 @@ First, inject `Ibexa\Contracts\ActivityLog\ActivityLogServiceInterface` into you
145142
In the following example, an event subscriber is subscribing to an event dispatched by a custom feature.
146143
This event has the information needed by a log entry (see details after the example).
147144

148-
```php
149-
[[= include_file('code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php') =]]
150-
```
151145
```php
152146
[[= include_code('code_samples/recent_activity/src/EventSubscriber/MyFeatureEventSubscriber.php') =]]
153147
```
@@ -195,9 +189,6 @@ In the following example, several actions are logged into one context group, eve
195189
- `simulate`
196190
- `complete`
197191

198-
``` php
199-
[[= include_file('code_samples/recent_activity/src/Command/ActivityLogContextTestCommand.php', 46, 66, remove_indent=True) =]]
200-
```
201192
``` php
202193
[[= include_code('code_samples/recent_activity/src/Command/ActivityLogContextTestCommand.php', 47, 66, remove_indent=True) =]]
203194
```
@@ -235,18 +226,12 @@ Your template can extend `@ibexadesign/activity_log/ui/default.html.twig`, and o
235226
First, follow an example of a default template overriding the one from the bundle.
236227
It can be used during development as a fallback for classes that aren't mapped yet.
237228

238-
``` twig
239-
[[= include_file('code_samples/recent_activity/templates/themes/admin/activity_log/ui/default.html.twig') =]]
240-
```
241229
``` twig
242230
[[= include_code('code_samples/recent_activity/templates/themes/admin/activity_log/ui/default.html.twig') =]]
243231
```
244232

245233
Here is an example of a `ClassNameMapperInterface` associating the class `App\MyFeature\MyFeature` with the identifier `my_feature`:
246234

247-
``` php
248-
[[= include_file('code_samples/recent_activity/src/ActivityLog/ClassNameMapper/MyFeatureNameMapper.php') =]]
249-
```
250235
``` php
251236
[[= include_code('code_samples/recent_activity/src/ActivityLog/ClassNameMapper/MyFeatureNameMapper.php') =]]
252237
```
@@ -256,18 +241,12 @@ This translation can be extracted with `php bin/console jms:translation:extract
256241

257242
To be taken into account, this mapper must be registered as a service:
258243

259-
``` yaml
260-
[[= include_file('code_samples/recent_activity/config/append_to_services.yaml') =]]
261-
```
262244
``` yaml
263245
[[= include_code('code_samples/recent_activity/config/append_to_services.yaml') =]]
264246
```
265247

266248
Here is an example of a `PostActivityListLoadEvent` subscriber which loads the related object when it's an `App\MyFeature\MyFeature`, and attaches it to the log entry:
267249

268-
``` php
269-
[[= include_file('code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php') =]]
270-
```
271250
``` php
272251
[[= include_code('code_samples/recent_activity/src/EventSubscriber/MyFeaturePostActivityListLoadEventSubscriber.php') =]]
273252
```
@@ -276,9 +255,6 @@ The following template is made to display the object of `App\MyFeature\MyFeature
276255
so, it's named in `templates/themes/admin/activity_log/ui/my_feature/simulate.html.twig`.
277256
Thanks to the previous subscriber, the related object is available at display time:
278257

279-
``` twig
280-
[[= include_file('code_samples/recent_activity/templates/themes/admin/activity_log/ui/my_feature/simulate.html.twig') =]]
281-
```
282258
``` twig
283259
[[= include_code('code_samples/recent_activity/templates/themes/admin/activity_log/ui/my_feature/simulate.html.twig') =]]
284260
```

docs/api/rest_api/rest_api_usage/rest_requests.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,12 @@ This script:
168168

169169
=== "XML"
170170

171-
``` php
172-
[[= include_file('code_samples/api/rest_api/create_image.xml.php', 0, None, ' ') =]]
173-
```
174171
``` php
175172
[[= include_code('code_samples/api/rest_api/create_image.xml.php', 1, None, 1) =]]
176173
```
177174

178175
=== "JSON"
179176

180-
``` php
181-
[[= include_file('code_samples/api/rest_api/create_image.json.php', 0, None, ' ') =]]
182-
```
183177
``` php
184178
[[= include_code('code_samples/api/rest_api/create_image.json.php', indent_level=1) =]]
185179
```

docs/search/search_api.md

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ For example, to search for all content of a selected content type, use one Crite
2727

2828
The following command takes the content type identifier as an argument and lists all results:
2929

30-
``` php hl_lines="14 16"
31-
// ...
32-
[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 4, 7) =]]// ...
33-
[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 17, 19) =]] // ...
34-
[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 32, 48) =]]
35-
[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 48, 49) =]]
36-
```
3730
``` php hl_lines="14 16"
3831
// ...
3932
[[= include_code('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 5, 7) =]]
@@ -127,12 +120,6 @@ It doesn't use the `SearchService` and isn't based on indexed data.
127120

128121
For example, the following command lists all content items under the specified parent location and sorts them by name in descending order:
129122

130-
``` php hl_lines="15-18"
131-
// ...
132-
[[= include_file('code_samples/api/public_php_api/src/Command/FilterCommand.php', 4, 9) =]]
133-
// ...
134-
[[= include_file('code_samples/api/public_php_api/src/Command/FilterCommand.php', 19, 21) =]][[= include_file('code_samples/api/public_php_api/src/Command/FilterCommand.php', 33, 53) =]]
135-
```
136123
``` php hl_lines="15-18"
137124
// ...
138125
[[= include_code('code_samples/api/public_php_api/src/Command/FilterCommand.php', 5, 9) =]]
@@ -144,12 +131,6 @@ For example, the following command lists all content items under the specified p
144131

145132
The same Filter can be applied to find locations instead of content items, for example:
146133

147-
``` php hl_lines="20"
148-
// ...
149-
[[= include_file('code_samples/api/public_php_api/src/Command/FilterLocationCommand.php', 4, 9) =]]
150-
[[= include_file('code_samples/api/public_php_api/src/Command/FilterCommand.php', 19, 21) =]]// ...
151-
[[= include_file('code_samples/api/public_php_api/src/Command/FilterLocationCommand.php', 33, 53) =]]
152-
```
153134
``` php hl_lines="20"
154135
// ...
155136
[[= include_code('code_samples/api/public_php_api/src/Command/FilterLocationCommand.php', 5, 9) =]]
@@ -206,11 +187,6 @@ $filter
206187
You can use the `SearchService` or repository filtering in a controller, as long as you provide the required parameters.
207188
For example, in the code below, `locationId` is provided to list all children of a location by using the `SearchService`.
208189

209-
``` php hl_lines="22-24"
210-
// ...
211-
[[= include_file('code_samples/api/public_php_api/src/Controller/CustomController.php', 4, 12) =]] // ...
212-
[[= include_file('code_samples/api/public_php_api/src/Controller/CustomController.php', 16, 32) =]]
213-
```
214190
``` php hl_lines="22-24"
215191
// ...
216192
[[= include_code('code_samples/api/public_php_api/src/Controller/CustomController.php', 5, 12) =]]
@@ -222,11 +198,6 @@ The rendering of results is then relegated to [templates](templates.md) (lines 2
222198

223199
When using Repository filtering, provide the results of `ContentService::find()` as parameters to the view:
224200

225-
``` php hl_lines="19"
226-
// ...
227-
[[= include_file('code_samples/api/public_php_api/src/Controller/CustomFilterController.php', 4, 12) =]] // ...
228-
[[= include_file('code_samples/api/public_php_api/src/Controller/CustomFilterController.php', 16, 31) =]]
229-
```
230201
``` php hl_lines="19"
231202
// ...
232203
[[= include_code('code_samples/api/public_php_api/src/Controller/CustomFilterController.php', 5, 12) =]]
@@ -238,11 +209,6 @@ When using Repository filtering, provide the results of `ContentService::find()`
238209

239210
To paginate search or filtering results, it's recommended to use the [Pagerfanta library](https://github.com/BabDev/Pagerfanta) and [[[= product_name =]]'s adapters for it.](https://github.com/ibexa/core/blob/main/src/lib/Pagination/Pagerfanta/Pagerfanta.php)
240211

241-
``` php
242-
// ...
243-
[[= include_file('code_samples/api/public_php_api/src/Controller/PaginationController.php', 8, 15) =]] // ...
244-
[[= include_file('code_samples/api/public_php_api/src/Controller/PaginationController.php', 19, 39) =]]
245-
```
246212
``` php
247213
// ...
248214
[[= include_code('code_samples/api/public_php_api/src/Controller/PaginationController.php', 9, 15) =]]
@@ -252,9 +218,6 @@ To paginate search or filtering results, it's recommended to use the [Pagerfanta
252218

253219
Pagination can then be rendered for example using the following template:
254220

255-
``` html+twig
256-
[[= include_file('code_samples/api/public_php_api/templates/themes/standard/full/custom_pagination.html.twig') =]]
257-
```
258221
``` html+twig
259222
[[= include_code('code_samples/api/public_php_api/templates/themes/standard/full/custom_pagination.html.twig') =]]
260223
```
@@ -286,11 +249,6 @@ For more information and examples, see [PagerFanta documentation](https://www.ba
286249
For more complex searches, you need to combine multiple Criteria.
287250
You can do it using logical operators: `LogicalAnd`, `LogicalOr`, and `LogicalNot`.
288251

289-
``` php
290-
[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 44, 49) =]][[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 53, 54) =]]
291-
[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 60, 65) =]]
292-
293-
```
294252
``` php
295253
[[= include_code('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 45, 49) =]]
296254
[[= include_code('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 54, 54) =]]
@@ -308,9 +266,6 @@ You can also nest different operators to construct more complex queries.
308266
The example below uses the `LogicalNot` operator to search for all content containing a given phrase
309267
that doesn't belong to the provided Section:
310268

311-
``` php
312-
[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 46, 54) =]]
313-
```
314269
``` php
315270
[[= include_code('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 47, 54) =]]
316271
```
@@ -344,9 +299,6 @@ To sort the results of a query, use one of more [Sort Clauses](sort_clause_refer
344299

345300
For example, to order search results by their publication date, from oldest to newest, and then alphabetically by content name, add the following Sort Clauses to the query:
346301

347-
``` php
348-
[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 55, 59) =]]
349-
```
350302
``` php
351303
[[= include_code('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 56, 59) =]]
352304
```
@@ -365,9 +317,6 @@ With aggregations you can find the count of search results or other result infor
365317

366318
To do this, you use of the query's `$aggregations` property:
367319

368-
``` php
369-
[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 30, 35) =]]
370-
```
371320
``` php
372321
[[= include_code('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 31, 35) =]]
373322
```
@@ -376,18 +325,12 @@ The name of the aggregation must be unique in the given query.
376325

377326
Access the results by using the `get()` method of the aggregation:
378327

379-
``` php
380-
[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 39, 40) =]]
381-
```
382328
``` php
383329
[[= include_code('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 40, 40) =]]
384330
```
385331

386332
Aggregation results contain the name of the result and the count of found items:
387333

388-
``` php
389-
[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 42, 45) =]]
390-
```
391334
``` php
392335
[[= include_code('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 43, 45) =]]
393336
```
@@ -397,19 +340,13 @@ In this case the aggregation takes the content type identifier and the field ide
397340

398341
The following example creates an aggregation named `selection` that groups results according to the value of the `topic` field in the `article` content type:
399342

400-
``` php
401-
[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 35, 36) =]]
402-
```
403343
``` php
404344
[[= include_code('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 36, 36) =]]
405345
```
406346

407347
With term aggregation you can define additional limits to the results.
408348
The following example limits the number of terms returned to 5 and only considers terms that have 10 or more results:
409349

410-
``` php
411-
[[= include_file('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 30, 33) =]]
412-
```
413350
``` php
414351
[[= include_code('code_samples/api/public_php_api/src/Command/FindWithAggregationCommand.php', 31, 33) =]]
415352
```
@@ -466,9 +403,6 @@ You build an `EmbeddingQuery` instance by using a builder and pass it to the sea
466403

467404
This example shows a minimal embedding query executed directly through the search service:
468405

469-
``` php hl_lines="38-39 41-47 49"
470-
[[= include_file('code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php') =]]
471-
```
472406
``` php hl_lines="38-39 41-47 49"
473407
[[= include_code('code_samples/api/public_php_api/src/Command/FindByTaxonomyEmbeddingCommand.php') =]]
474408
```
@@ -486,10 +420,6 @@ For a list of supported Criteria and Sort Clauses, see [Search in trash referenc
486420

487421
Searching through the trashed content items operates directly on the database, therefore you cannot use external search engines, such as Solr or Elasticsearch, and it's impossible to reindex the data.
488422

489-
``` php
490-
[[= include_file('code_samples/api/public_php_api/src/Command/FindInTrashCommand.php', 4, 6) =]]//...
491-
[[= include_file('code_samples/api/public_php_api/src/Command/FindInTrashCommand.php', 35, 42) =]]
492-
```
493423
``` php
494424
[[= include_code('code_samples/api/public_php_api/src/Command/FindInTrashCommand.php', 5, 6) =]]
495425
//...

0 commit comments

Comments
 (0)