ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ScaffoldFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
32
34{
37
38 public function __construct(
41 ) {
42 $this->data_factory = $data_factory;
43 $this->ressource_id_factory = $ressource_id_factory;
44 }
45
46 public function scaffold(DefinitionInterface $definition): ElementInterface
47 {
48 return new Element(
49 NoID::SCAFFOLD,
50 $definition,
51 $this->data_factory->null()
52 );
53 }
54
55 public function set(DefinitionInterface $root_definition): SetInterface
56 {
57 return new Set(
58 $this->ressource_id_factory->null(),
59 new Element(
60 NoID::ROOT,
61 $root_definition,
62 $this->data_factory->null()
63 )
64 );
65 }
66}
__construct(DataFactoryInterface $data_factory, RessourceIDFactoryInterface $ressource_id_factory)