ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
Paths.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
27 class Paths implements PathsInterface
28 {
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 
54  public function keywords(): PathInterface
55  {
56  return $this->custom()
57  ->withNextStep('general')
58  ->withNextStep('keyword')
59  ->withNextStep('string')
60  ->get();
61  }
62 
63  public function languages(): PathInterface
64  {
65  return $this->custom()
66  ->withNextStep('general')
67  ->withNextStep('language')
68  ->get();
69  }
70 
71  public function authors(): PathInterface
72  {
73  return $this->custom()
74  ->withNextStep('lifeCycle')
75  ->withNextStep('contribute')
76  ->withNextStep('role')
77  ->withNextStep('value')
78  ->withAdditionalFilterAtCurrentStep(FilterType::DATA, 'author')
79  ->withNextStepToSuperElement()
80  ->withNextStep('source')
81  ->withAdditionalFilterAtCurrentStep(FilterType::DATA, 'LOMv1.0')
82  ->withNextStepToSuperElement()
83  ->withNextStepToSuperElement()
84  ->withNextStep('entity')
85  ->get();
86  }
87 
89  {
90  return $this->custom()
91  ->withNextStep('educational')
92  ->withAdditionalFilterAtCurrentStep(FilterType::INDEX, '0')
93  ->withNextStep('typicalLearningTime')
94  ->withNextStep('duration')
95  ->get();
96  }
97 
98  public function copyright(): PathInterface
99  {
100  return $this->custom()
101  ->withNextStep('rights')
102  ->withNextStep('description')
103  ->withNextStep('string')
104  ->get();
105  }
106 
107  public function custom(): BuilderInterface
108  {
109  return new Builder($this->path_factory->custom());
110  }
111 }
languages()
Path to general > language.
Definition: Paths.php:63
FilterType
Values should always be all lowercase.
Definition: FilterType.php:26
authors()
Path to lifeCycle > contribute > entity, where the contribute has a role > value with value &#39;author&#39;...
Definition: Paths.php:71
firstTypicalLearningTime()
Path to educational > typicalLearningTime > duration, restricted to the first instance of educational...
Definition: Paths.php:88
copyright()
Path to rights > description > string.
Definition: Paths.php:98
descriptions()
Path to general > description > string.
Definition: Paths.php:45
__construct(PathFactory $path_factory)
Definition: Paths.php:31
title()
Path to general > title > string.
Definition: Paths.php:36
custom()
Get a builder to construct custom paths.
Definition: Paths.php:107
keywords()
Path to general > keyword > string.
Definition: Paths.php:54