PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.2
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.2
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / llms-txt / application / markdown-builders / link-lists-builder.php

link-lists-builder.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.2, at src/llms-txt/application/markdown-builders/link-lists-builder.php

55 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong
4 namespace Yoast\WP\SEO\Llms_Txt\Application\Markdown_Builders;
5
6 use Yoast\WP\SEO\Llms_Txt\Domain\Markdown\Sections\Link_List;
7 use Yoast\WP\SEO\Llms_Txt\Infrastructure\Markdown_Services\Content_Types_Collector;
8 use Yoast\WP\SEO\Llms_Txt\Infrastructure\Markdown_Services\Terms_Collector;
9
10 /**
11 * The builder of the link list sections.
12 */
13 class Link_Lists_Builder {
14
15 /**
16 * The content types collector.
17 *
18 * @var Content_Types_Collector
19 */
20 private $content_types_collector;
21
22 /**
23 * The terms collector.
24 *
25 * @var Terms_Collector
26 */
27 private $terms_collector;
28
29 /**
30 * Constructs the class.
31 *
32 * @param Content_Types_Collector $content_types_collector The content types collector.
33 * @param Terms_Collector $terms_collector The terms collector.
34 */
35 public function __construct(
36 Content_Types_Collector $content_types_collector,
37 Terms_Collector $terms_collector
38 ) {
39 $this->content_types_collector = $content_types_collector;
40 $this->terms_collector = $terms_collector;
41 }
42
43 /**
44 * Builds the link list sections.
45 *
46 * @return Link_List[] The link list sections.
47 */
48 public function build_link_lists(): array {
49 return \array_merge(
50 $this->content_types_collector->get_content_types_lists(),
51 $this->terms_collector->get_terms_lists(),
52 );
53 }
54 }
55