ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Factory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
28 class Factory implements FactoryInterface
29 {
30  public function standard(SlotIdentifier $slot, string ...$values): BuilderInterface
31  {
32  return new Builder(
33  $slot,
34  Type::STANDARD,
35  $slot->value,
37  ...$values
38  );
39  }
40 
41  public function controlledString(
42  SlotIdentifier $slot,
43  string $id,
44  string $source,
45  string ...$values
46  ): BuilderInterface {
47  return new Builder($slot, Type::CONTROLLED_STRING, $id, $source, ...$values);
48  }
49 
50  public function controlledVocabValue(
51  SlotIdentifier $slot,
52  string $id,
53  string $source,
54  string ...$values
55  ): BuilderInterface {
56  return new Builder($slot, Type::CONTROLLED_VOCAB_VALUE, $id, $source, ...$values);
57  }
58 
59  public function copyright(string ...$values): BuilderInterface
60  {
61  return new Builder(
62  SlotIdentifier::RIGHTS_DESCRIPTION,
64  SlotIdentifier::RIGHTS_DESCRIPTION->value,
66  ...$values
67  );
68  }
69 
70  public function null(): VocabularyInterface
71  {
72  return new NullVocabulary();
73  }
74 }
controlledVocabValue(SlotIdentifier $slot, string $id, string $source, string ... $values)
Definition: Factory.php:50
controlledString(SlotIdentifier $slot, string $id, string $source, string ... $values)
Definition: Factory.php:41
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
standard(SlotIdentifier $slot, string ... $values)
Definition: Factory.php:30