Skip to content

Commit cb59d52

Browse files
authored
Fix line numbers (#2256)
* browsing_content.md: Fix line numbers * creating_content.md: Fix line numbers * search_api.md: Fix line numbers
1 parent 7b960d0 commit cb59d52

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

docs/content_management/content_api/browsing_content.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ To retrieve the Fields of the selected Content item, you can use the following c
168168
}
169169
```
170170

171-
Line 16 shows how [`ContentService::loadContent`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/ContentService.php#L147) loads the Content item provided to the command.
172-
Line 17 makes use of the [`ContentTypeService`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/ContentTypeService.php) to retrieve the Content Type of the requested item.
171+
Line 9 shows how [`ContentService::loadContent`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/ContentService.php#L147) loads the Content item provided to the command.
172+
Line 14 makes use of the [`ContentTypeService`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/ContentTypeService.php) to retrieve the Content Type of the requested item.
173173

174-
Lines 19-24 iterate over Fields defined by the Content Type.
174+
Lines 12-19 iterate over Fields defined by the Content Type.
175175
For each Field they print out its identifier, and then using [`FieldTypeService`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/FieldTypeService.php) retrieve the Field's value and print it out to the console.
176176

177177
## Viewing content in different languages
@@ -199,9 +199,9 @@ you need to use the [`LocationService`](https://github.com/ibexa/core/blob/main/
199199
[[= include_file('code_samples/api/public_php_api/src/Command/BrowseLocationsCommand.php', 30, 49) =]]
200200
```
201201

202-
`loadLocation` (line 14) returns a value object, here a `Location`.
202+
`loadLocation` (line 15) returns a value object, here a `Location`.
203203

204-
[`LocationService::loadLocationChildren`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/LocationService.php#L106) (line 23)
204+
[`LocationService::loadLocationChildren`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/LocationService.php#L106) (line 5)
205205
returns a [`LocationList`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/Values/Content/LocationList.php) value object that you can iterate over.
206206

207207
!!! note

docs/content_management/content_api/creating_content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ returns a new [`ContentCreateStruct`](https://github.com/ibexa/core/blob/main/sr
2424
[[= include_file('code_samples/api/public_php_api/src/Command/CreateContentCommand.php', 57, 66) =]]
2525
```
2626

27-
This command creates a draft using [`ContentService::createContent`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/ContentService.php#L210) (line 21).
27+
This command creates a draft using [`ContentService::createContent`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/ContentService.php#L210) (line 7).
2828
This method must receive a `ContentCreateStruct` and an array of Location structs.
2929

30-
`ContentCreateStruct` (which extends `ContentStruct`) is created through [`ContentService::newContentCreateStruct`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/ContentService.php#L533) (line 17),
30+
`ContentCreateStruct` (which extends `ContentStruct`) is created through [`ContentService::newContentCreateStruct`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/ContentService.php#L533) (line 2),
3131
which receives the Content Type and the primary language for the Content item.
3232
For information about translating a Content item into other languages, see [Translating content](#translating-content).
3333

34-
[`ContentStruct::setField`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/Values/Content/ContentStruct.php#L32) (line 18) enables you to define the Field values.
34+
[`ContentStruct::setField`](https://github.com/ibexa/core/blob/main/src/contracts/Repository/Values/Content/ContentStruct.php#L32) (line 3) enables you to define the Field values.
3535
When the Field accepts a simple value, you can provide it directly, as in the example above.
3636
For some Field Types, for example [images](#creating-an-image), you need to provide an instance of a Value type.
3737

docs/search/search_api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ For example, in the code below, `locationId` is provided to list all children of
196196
[[= include_file('code_samples/api/public_php_api/src/Controller/CustomController.php', 18, 34) =]]
197197
```
198198

199-
The rendering of results is then relegated to [templates](templates.md) (lines 20-22).
199+
The rendering of results is then relegated to [templates](templates.md) (lines 21-23).
200200

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

@@ -250,15 +250,15 @@ For more complex searches, you need to combine multiple Criteria.
250250
You can do it using logical operators: `LogicalAnd`, `LogicalOr`, and `LogicalNot`.
251251

252252
``` php
253-
[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 43, 49) =]][[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 52, 53) =]]
254-
[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 59, 64) =]]
253+
[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 43, 49) =]][[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 53, 54) =]]
254+
[[= include_file('code_samples/api/public_php_api/src/Command/FindComplexCommand.php', 60, 65) =]]
255255
```
256256

257257
This example takes three parameters from a command — `$text`, `$contentTypeId`, and `$locationId`.
258258
It then combines them using `Criterion\LogicalAnd` to search for Content items
259-
that belong to a specific subtree, have the chosen Content Type and contain the provided text (lines 6-8).
259+
that belong to a specific subtree, have the chosen Content Type and contain the provided text (lines 3-6).
260260

261-
This also shows that you can get the total number of search results using the `totalCount` property of search results (line 11).
261+
This also shows that you can get the total number of search results using the `totalCount` property of search results (line 9).
262262

263263
You can also nest different operators to construct more complex queries.
264264
The example below uses the `LogicalNot` operator to search for all content containing a given phrase

0 commit comments

Comments
 (0)