[TASK] Set extension version and dependencies to 7.2
[Packages/TYPO3.CMS.git] / typo3 / sysext / beuser / Classes / Domain / Model / ModuleData.php
1 <?php
2 namespace TYPO3\CMS\Beuser\Domain\Model;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Module data object
19 *
20 * @author Felix Kopp <felix-source@phorax.com>
21 * @author Nikolas Hagelstein <nikolas.hagelstein@gmail.com>
22 */
23 class ModuleData {
24
25 /**
26 * @var \TYPO3\CMS\Beuser\Domain\Model\Demand
27 * @inject
28 */
29 protected $demand;
30
31 /**
32 * @var array
33 */
34 protected $compareUserList = array();
35
36 /**
37 * @return \TYPO3\CMS\Beuser\Domain\Model\Demand
38 */
39 public function getDemand() {
40 return $this->demand;
41 }
42
43 /**
44 * @param \TYPO3\CMS\Beuser\Domain\Model\Demand $demand
45 * @return void
46 */
47 public function setDemand(\TYPO3\CMS\Beuser\Domain\Model\Demand $demand) {
48 $this->demand = $demand;
49 }
50
51 /**
52 * Returns the compare list as array of user uis
53 *
54 * @return array
55 */
56 public function getCompareUserList() {
57 return array_keys($this->compareUserList);
58 }
59
60 /**
61 * Adds one backend user (by uid) to the compare user list
62 * Cannot be ObjectStorage, must be array
63 *
64 * @param int $uid
65 * @return void
66 */
67 public function attachUidCompareUser($uid) {
68 $this->compareUserList[$uid] = TRUE;
69 }
70
71 /**
72 * Strip one backend user from the compare user list
73 *
74 * @param int $uid
75 * @return void
76 */
77 public function detachUidCompareUser($uid) {
78 unset($this->compareUserList[$uid]);
79 }
80
81 }