diff --git a/docs/administration/back_office/back_office_tabs/create_dashboard_tab.md b/docs/administration/back_office/back_office_tabs/create_dashboard_tab.md index 968f6fb7d9..f2c86c599e 100644 --- a/docs/administration/back_office/back_office_tabs/create_dashboard_tab.md +++ b/docs/administration/back_office/back_office_tabs/create_dashboard_tab.md @@ -7,14 +7,14 @@ description: Add a new tab to the back office dashboard that welcomes every user To create a new tab in the dashboard, create an `EveryoneArticleTab.php` file in `src/Tab/Dashboard/Everyone`. This adds a tab to the **Common content** dashboard block that displays all articles in the repository. -``` php hl_lines="17 45 57-60 71-73" +``` php hl_lines="17 38 50-53 64-66" [[= include_file('code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php') =]] ``` -This tab searches for content with content type "Article" (lines 57-60) and uses the built-in `all_content.html.twig` template to render the results, which ensures that the tab looks the same as the existing tabs (lines 71-73). +This tab searches for content with content type "Article" (lines 50-53) and uses the built-in `all_content.html.twig` template to render the results, which ensures that the tab looks the same as the existing tabs (lines 64-66). -The tab also implements OrderedTabInterface (line 17), which enables you to define the order in which the tab is displayed on the dashboard page. -It's done with the `getOrder()` method (line 45). +The tab also implements [`OrderedTabInterface`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-AdminUi-Tab-OrderedTabInterface.html) (line 17), which enables you to define the order in which the tab is displayed on the dashboard page. +It's done with the `getOrder()` method (line 38). Register this tab as a service: diff --git a/docs/content_management/pages/page_block_attributes.md b/docs/content_management/pages/page_block_attributes.md index c3d987ce3a..fa314bb519 100644 --- a/docs/content_management/pages/page_block_attributes.md +++ b/docs/content_management/pages/page_block_attributes.md @@ -70,7 +70,7 @@ for example `AbstractType` for any custom type or `IntegerType` for numeric type To define the type, create a `src/Block/Attribute/MyStringAttributeType.php` file: -``` php hl_lines="5 6 15" +``` php hl_lines="5 6 17" [[= include_file('code_samples/page/custom_attribute/src/Block/Attribute/MyStringAttributeType.php') =]] ``` diff --git a/docs/search/search_api.md b/docs/search/search_api.md index de1c1bca69..9f69bf8dc6 100644 --- a/docs/search/search_api.md +++ b/docs/search/search_api.md @@ -22,18 +22,18 @@ The service should be [injected into the constructor of your command or controll To search through content you need to create a [`LocationQuery`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-Values-Content-LocationQuery.html) and provide your Search Criteria as a series of Criterion objects. -For example, to search for all content of a selected content type, use one Criterion, [`Criterion\ContentTypeIdentifier`](contenttypeidentifier_criterion.md) (line 12). +For example, to search for all content of a selected content type, use one Criterion, [`Criterion\ContentTypeIdentifier`](contenttypeidentifier_criterion.md) (line 14). The following command takes the content type identifier as an argument and lists all results: -``` php hl_lines="12 14" +``` php hl_lines="14 16" // ... [[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 4, 7) =]]// ... -[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 14, 18) =]] // ... -[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 37, 45) =]]} +[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 17, 19) =]] // ... +[[= include_file('code_samples/api/public_php_api/src/Command/FindContentCommand.php', 32, 48) =]]} ``` -[`SearchService::findContentInfo`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-SearchService.html#method_findContentInfo) (line 14) +[`SearchService::findContentInfo`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-SearchService.html#method_findContentInfo) (line 16) retrieves [`ContentInfo`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Persistence-Content-ContentInfo.html) objects of the found content items. You can also use [`SearchService::findContent`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Core-Repository-SearchService.html#method_findContent) to get full Content objects, together with their field information.