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: /**
16: * Class GetPasteRootButtonEvent.
17: *
18: * This event gets emitted when a root button get's rendered in hierarchical mode.
19: *
20: * @package DcGeneral\Contao\View\Contao2BackendView\Event
21: */
22: class GetPasteRootButtonEvent
23: extends BaseButtonEvent
24: {
25: const NAME = 'dc-general.view.contao2backend.get-paste-root-button';
26:
27: /**
28: * The href information to use for the paste button.
29: *
30: * @var string
31: */
32: protected $href;
33:
34: /**
35: * Determinator if the paste button shall be disabled.
36: *
37: * @var bool
38: */
39: protected $pasteDisabled;
40:
41: /**
42: * Set the href for the button.
43: *
44: * @param string $href The href.
45: *
46: * @return $this
47: */
48: public function setHref($href)
49: {
50: $this->href = $href;
51:
52: return $this;
53: }
54: /**
55: * Get the href for the button.
56: *
57: * @return string
58: */
59: public function getHref()
60: {
61: return $this->href;
62: }
63:
64: /**
65: * Set the determinator if the button shall be disabled or not.
66: *
67: * @param boolean $pasteDisabled The flag.
68: *
69: * @return $this
70: */
71: public function setPasteDisabled($pasteDisabled)
72: {
73: $this->pasteDisabled = $pasteDisabled;
74:
75: return $this;
76: }
77:
78: /**
79: * Check if the paste button shall be disabled or not.
80: *
81: * @return boolean
82: */
83: public function isPasteDisabled()
84: {
85: return $this->pasteDisabled;
86: }
87: }
88: