ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Paths.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
27class Paths implements PathsInterface
28{
29 protected PathFactory $path_factory;
30
31 public function __construct(PathFactory $path_factory)
32 {
33 $this->path_factory = $path_factory;
34 }
35
36 public function title(): PathInterface
37 {
38 return $this->custom()
39 ->withNextStep('general')
40 ->withNextStep('title')
41 ->withNextStep('string')
42 ->get();
43 }
44
45 public function descriptions(): PathInterface
46 {
47 return $this->custom()
48 ->withNextStep('general')
49 ->withNextStep('description')
50 ->withNextStep('string')
51 ->get();
52 }
53
55 {
56 return $this->custom()
57 ->withNextStep('general')
58 ->withNextStep('description')
59 ->withAdditionalFilterAtCurrentStep(FilterType::INDEX, '0')
60 ->withNextStep('string')
61 ->get();
62 }
63
64 public function keywords(): PathInterface
65 {
66 return $this->custom()
67 ->withNextStep('general')
68 ->withNextStep('keyword')
69 ->withNextStep('string')
70 ->get();
71 }
72
73 public function languages(): PathInterface
74 {
75 return $this->custom()
76 ->withNextStep('general')
77 ->withNextStep('language')
78 ->get();
79 }
80
81 public function authors(): PathInterface
82 {
83 return $this->custom()
84 ->withNextStep('lifeCycle')
85 ->withNextStep('contribute')
86 ->withNextStep('role')
87 ->withNextStep('value')
88 ->withAdditionalFilterAtCurrentStep(FilterType::DATA, 'author')
89 ->withNextStepToSuperElement()
90 ->withNextStep('source')
91 ->withAdditionalFilterAtCurrentStep(FilterType::DATA, 'LOMv1.0')
92 ->withNextStepToSuperElement()
93 ->withNextStepToSuperElement()
94 ->withNextStep('entity')
95 ->get();
96 }
97
99 {
100 return $this->custom()
101 ->withNextStep('educational')
102 ->withAdditionalFilterAtCurrentStep(FilterType::INDEX, '0')
103 ->withNextStep('typicalLearningTime')
104 ->withNextStep('duration')
105 ->get();
106 }
107
108 public function copyright(): PathInterface
109 {
110 return $this->custom()
111 ->withNextStep('rights')
112 ->withNextStep('description')
113 ->withNextStep('string')
114 ->get();
115 }
116
117 public function custom(): BuilderInterface
118 {
119 return new Builder($this->path_factory->custom());
120 }
121}
descriptions()
Path to general > description > string.
Definition: Paths.php:45
firstTypicalLearningTime()
Path to educational > typicalLearningTime > duration, restricted to the first instance of educational...
Definition: Paths.php:98
copyright()
Path to rights > description > string.
Definition: Paths.php:108
languages()
Path to general > language.
Definition: Paths.php:73
title()
Path to general > title > string.
Definition: Paths.php:36
custom()
Get a builder to construct custom paths.
Definition: Paths.php:117
keywords()
Path to general > keyword > string.
Definition: Paths.php:64
firstDescription()
Path to general > description > string, restricted to the first description.
Definition: Paths.php:54
__construct(PathFactory $path_factory)
Definition: Paths.php:31
authors()
Path to lifeCycle > contribute > entity, where the contribute has a role > value with value 'author'.
Definition: Paths.php:81
FilterType
Values should always be all lowercase.
Definition: FilterType.php:27