1: <?php
2: /**
3: * PHP version 5
4: *
5: * @package generalDriver
6: * @author Christian Schiffler <c.schiffler@cyberspectrum.de>
7: * @author Stefan Heimes <stefan_heimes@hotmail.com>
8: * @author Tristan Lins <tristan.lins@bit3.de>
9: * @copyright The MetaModels team.
10: * @license LGPL.
11: * @filesource
12: */
13:
14: namespace DcGeneral\Contao\DataDefinition\Definition;
15:
16: use DcGeneral\DataDefinition\Definition\View\CommandCollection;
17: use DcGeneral\DataDefinition\Definition\View\DefaultListingConfig;
18: use DcGeneral\DataDefinition\Definition\View\DefaultPanelLayout;
19: use DcGeneral\DataDefinition\Definition\View\CommandCollectionInterface;
20: use DcGeneral\DataDefinition\Definition\View\PanelLayoutInterface;
21: use DcGeneral\DataDefinition\Definition\View\ListingConfigInterface;
22:
23: /**
24: * Interface BasicDefinitionInterface
25: *
26: * @package DcGeneral\DataDefinition\Definition
27: */
28: class Contao2BackendViewDefinition implements Contao2BackendViewDefinitionInterface
29: {
30: /**
31: * The listing configuration for this backend view.
32: *
33: * @var ListingConfigInterface
34: */
35: protected $listingConfig;
36:
37: /**
38: * The collection of global commands for this backend view.
39: *
40: * @var CommandCollectionInterface
41: */
42: protected $globalCommands;
43:
44: /**
45: * The collection of commands invokable on a model for this backend view.
46: *
47: * @var CommandCollectionInterface
48: */
49: protected $modelCommands;
50:
51: /**
52: * The current panel layout.
53: *
54: * @var PanelLayoutInterface
55: */
56: protected $panelLayout;
57:
58: /**
59: * Create a new instance of the Contao2BackendViewDefinition.
60: *
61: * The sections will get initialized with instances of the default implementation.
62: */
63: public function __construct()
64: {
65: $this->listingConfig = new DefaultListingConfig();
66: $this->globalCommands = new CommandCollection();
67: $this->modelCommands = new CommandCollection();
68: $this->panelLayout = new DefaultPanelLayout();
69: }
70:
71: /**
72: * {@inheritdoc}
73: */
74: public function getListingConfig()
75: {
76: return $this->listingConfig;
77: }
78:
79: /**
80: * {@inheritdoc}
81: */
82: public function getGlobalCommands()
83: {
84: return $this->globalCommands;
85: }
86:
87: /**
88: * {@inheritdoc}
89: */
90: public function getModelCommands()
91: {
92: return $this->modelCommands;
93: }
94:
95: /**
96: * {@inheritdoc}
97: */
98: public function getPanelLayout()
99: {
100: return $this->panelLayout;
101: }
102: }
103:
104:
105:
106: