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\Contao\View\Contao2BackendView\Event;
14:
15: use DcGeneral\Event\AbstractModelAwareEvent;
16:
17: /**
18: * Class ParentViewChildRecordEvent.
19: *
20: * This event gets emitted when a child record gets rendered in the parent view.
21: *
22: * @package DcGeneral\Contao\View\Contao2BackendView\Event
23: */
24: class ParentViewChildRecordEvent
25: extends AbstractModelAwareEvent
26: {
27: const NAME = 'dc-general.view.contao2backend.parent-view-child-record';
28:
29: /**
30: * The html code to use for the model.
31: *
32: * @var string
33: */
34: protected $html;
35:
36: /**
37: * Set the html code to use as child record.
38: *
39: * @param string $html The html code.
40: *
41: * @return $this
42: */
43: public function setHtml($html)
44: {
45: $this->html = $html;
46:
47: return $this;
48: }
49:
50: /**
51: * Retrieve the stored html code for the child record.
52: *
53: * @return string
54: */
55: public function getHtml()
56: {
57: return $this->html;
58: }
59: }
60: