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 GetGlobalButtonEvent.
17: *
18: * This event gets issued when the top level buttons in the listing view are being retrieved.
19: *
20: * These buttons include, but are not limited to, the "back" button and the "edit multiple" button.
21: *
22: * @package DcGeneral\Contao\View\Contao2BackendView\Event
23: */
24: class GetGlobalButtonEvent
25: extends BaseButtonEvent
26: {
27: const NAME = 'dc-general.view.contao2backend.get-global-button';
28:
29: /**
30: * The hotkey for the button.
31: *
32: * @var string
33: */
34: protected $accessKey;
35:
36: /**
37: * The css class to use.
38: *
39: * @var string
40: */
41: protected $class;
42:
43: /**
44: * The href to use.
45: *
46: * @var string
47: */
48: protected $href;
49:
50: /**
51: * Set the hotkey for the button.
52: *
53: * @param string $accessKey The hotkey for the button.
54: *
55: * @return $this
56: */
57: public function setAccessKey($accessKey)
58: {
59: $this->accessKey = $accessKey;
60:
61: return $this;
62: }
63:
64: /**
65: * Get the hotkey for the button.
66: *
67: * @return string
68: */
69: public function getAccessKey()
70: {
71: return $this->accessKey;
72: }
73:
74: /**
75: * Set the css class for this button.
76: *
77: * @param string $class The css class.
78: *
79: * @return $this
80: */
81: public function setClass($class)
82: {
83: $this->class = $class;
84:
85: return $this;
86: }
87:
88: /**
89: * Get the css class for this button.
90: *
91: * @return string
92: */
93: public function getClass()
94: {
95: return $this->class;
96: }
97:
98: /**
99: * Set the href for this button.
100: *
101: * @param string $href The href.
102: *
103: * @return $this
104: */
105: public function setHref($href)
106: {
107: $this->href = $href;
108:
109: return $this;
110: }
111:
112: /**
113: * Get the href for this button.
114: *
115: * @return string
116: */
117: public function getHref()
118: {
119: return $this->href;
120: }
121: }
122: