1: <?php
2: /**
3: * PHP version 5
4: * @package generalDriver
5: * @author Christian Schiffler <c.schiffler@cyberspectrum.de>
6: * @author Stefan Heimes <stefan_heimes@hotmail.com>
7: * @author Tristan Lins <tristan.lins@bit3.de>
8: * @copyright The MetaModels team.
9: * @license LGPL.
10: * @filesource
11: */
12:
13: namespace DcGeneral\Panel;
14:
15: use DcGeneral\Data\ConfigInterface;
16: use DcGeneral\View\ViewTemplateInterface;
17:
18: /**
19: * A simple element contained within a panel.
20: *
21: * @package DcGeneral\Panel
22: */
23: interface PanelElementInterface
24: {
25: /**
26: * Return the parenting panel.
27: *
28: * @return PanelInterface
29: */
30: public function getPanel();
31:
32: /**
33: * Return the parenting panel.
34: *
35: * @param PanelInterface $objPanel The panel to use as parent.
36: *
37: * @return PanelElementInterface
38: */
39: public function setPanel(PanelInterface $objPanel);
40:
41: /**
42: * Initialize the passed configuration with the values of the element.
43: *
44: * @param ConfigInterface $objConfig The config to which the initialization shall be applied to.
45: *
46: * @param PanelElementInterface $objElement The element to be initialized (if any).
47: *
48: * @return void
49: */
50: public function initialize(ConfigInterface $objConfig, PanelElementInterface $objElement = null);
51:
52: /**
53: * Render the element using the given Template.
54: *
55: * @param ViewTemplateInterface $objTemplate The Template to use.
56: *
57: * @return PanelElementInterface
58: */
59: public function render(ViewTemplateInterface $objTemplate);
60: }
61: