| @@ 11-193 (lines=183) @@ | ||
| 8 | * @ORM\Entity() |
|
| 9 | * @ORM\Table(name="actions") |
|
| 10 | */ |
|
| 11 | class Action |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @ORM\Column(type="integer") |
|
| 15 | * @ORM\Id |
|
| 16 | * @ORM\GeneratedValue(strategy="AUTO") |
|
| 17 | */ |
|
| 18 | private $id; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * @ORM\Column(type="string", length=100) |
|
| 22 | */ |
|
| 23 | private $name; |
|
| 24 | ||
| 25 | /** |
|
| 26 | * @ORM\Column(type="string", length=100) |
|
| 27 | */ |
|
| 28 | private $alias; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * @return mixed |
|
| 32 | */ |
|
| 33 | public function getAlias() |
|
| 34 | { |
|
| 35 | return $this->alias; |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @param mixed $alias |
|
| 40 | * @return Action |
|
| 41 | */ |
|
| 42 | public function setAlias($alias) |
|
| 43 | { |
|
| 44 | $this->alias = $alias; |
|
| 45 | return $this; |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @ORM\Column(type="string", length=100) |
|
| 50 | */ |
|
| 51 | private $executor; |
|
| 52 | ||
| 53 | /** |
|
| 54 | * @ORM\Column(type="text") |
|
| 55 | */ |
|
| 56 | private $arguments; |
|
| 57 | ||
| 58 | /** |
|
| 59 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Device", inversedBy="actions") |
|
| 60 | */ |
|
| 61 | private $device; |
|
| 62 | ||
| 63 | /** |
|
| 64 | * @ORM\Column(type="string", length=100) |
|
| 65 | */ |
|
| 66 | private $type; |
|
| 67 | ||
| 68 | ||
| 69 | /** |
|
| 70 | * @ORM\OneToMany(targetEntity="AppBundle\Entity\ActionHistory", mappedBy="action") |
|
| 71 | */ |
|
| 72 | public $history; |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @ORM\OneToMany(targetEntity="AppBundle\Entity\VarHook", mappedBy="action") |
|
| 76 | */ |
|
| 77 | public $hooks; |
|
| 78 | ||
| 79 | ||
| 80 | /** |
|
| 81 | * @return mixed |
|
| 82 | */ |
|
| 83 | public function getType() |
|
| 84 | { |
|
| 85 | return $this->type; |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * @param mixed $type |
|
| 90 | * @return Action |
|
| 91 | */ |
|
| 92 | public function setType($type) |
|
| 93 | { |
|
| 94 | $this->type = $type; |
|
| 95 | return $this; |
|
| 96 | } |
|
| 97 | ||
| 98 | /** |
|
| 99 | * @return Device |
|
| 100 | */ |
|
| 101 | public function getDevice() |
|
| 102 | { |
|
| 103 | return $this->device; |
|
| 104 | } |
|
| 105 | ||
| 106 | /** |
|
| 107 | * @param mixed $device |
|
| 108 | * @return Action |
|
| 109 | */ |
|
| 110 | public function setDevice($device) |
|
| 111 | { |
|
| 112 | $this->device = $device; |
|
| 113 | return $this; |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * @return mixed |
|
| 118 | */ |
|
| 119 | public function getArguments() |
|
| 120 | { |
|
| 121 | return $this->arguments; |
|
| 122 | } |
|
| 123 | ||
| 124 | /** |
|
| 125 | * @param mixed $arguments |
|
| 126 | * @return Action |
|
| 127 | */ |
|
| 128 | public function setArguments($arguments) |
|
| 129 | { |
|
| 130 | $this->arguments = $arguments; |
|
| 131 | return $this; |
|
| 132 | } |
|
| 133 | ||
| 134 | ||
| 135 | /** |
|
| 136 | * @return mixed |
|
| 137 | */ |
|
| 138 | public function getId() |
|
| 139 | { |
|
| 140 | return $this->id; |
|
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * @param mixed $id |
|
| 145 | * @return Action |
|
| 146 | */ |
|
| 147 | public function setId($id) |
|
| 148 | { |
|
| 149 | $this->id = $id; |
|
| 150 | return $this; |
|
| 151 | } |
|
| 152 | ||
| 153 | /** |
|
| 154 | * @return mixed |
|
| 155 | */ |
|
| 156 | public function getName() |
|
| 157 | { |
|
| 158 | return $this->name; |
|
| 159 | } |
|
| 160 | ||
| 161 | /** |
|
| 162 | * @param mixed $name |
|
| 163 | * @return Action |
|
| 164 | */ |
|
| 165 | public function setName($name) |
|
| 166 | { |
|
| 167 | $this->name = $name; |
|
| 168 | return $this; |
|
| 169 | } |
|
| 170 | ||
| 171 | /** |
|
| 172 | * @return mixed |
|
| 173 | */ |
|
| 174 | public function getExecutor() |
|
| 175 | { |
|
| 176 | return $this->executor; |
|
| 177 | } |
|
| 178 | ||
| 179 | /** |
|
| 180 | * @param mixed $executor |
|
| 181 | * @return Action |
|
| 182 | */ |
|
| 183 | public function setExecutor($executor) |
|
| 184 | { |
|
| 185 | $this->executor = $executor; |
|
| 186 | return $this; |
|
| 187 | } |
|
| 188 | ||
| 189 | public function __toString() |
|
| 190 | { |
|
| 191 | return $this->getName(); |
|
| 192 | } |
|
| 193 | } |
|
| 194 | ||
| @@ 11-182 (lines=172) @@ | ||
| 8 | * @ORM\Entity |
|
| 9 | * @ORM\Table(name="variable_hooks") |
|
| 10 | */ |
|
| 11 | class VarHook |
|
| 12 | { |
|
| 13 | ||
| 14 | /** |
|
| 15 | * @ORM\Column(type="integer") |
|
| 16 | * @ORM\Id |
|
| 17 | * @ORM\GeneratedValue(strategy="AUTO") |
|
| 18 | */ |
|
| 19 | private $id; |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @ORM\Column(type="string", length=100) |
|
| 23 | */ |
|
| 24 | private $name; |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @return mixed |
|
| 28 | */ |
|
| 29 | public function getType() |
|
| 30 | { |
|
| 31 | return $this->type; |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * @param mixed $type |
|
| 36 | * @return VarHook |
|
| 37 | */ |
|
| 38 | public function setType($type) |
|
| 39 | { |
|
| 40 | $this->type = $type; |
|
| 41 | return $this; |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @return mixed |
|
| 46 | */ |
|
| 47 | public function getExecutor() |
|
| 48 | { |
|
| 49 | return $this->executor; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @param mixed $executor |
|
| 54 | * @return VarHook |
|
| 55 | */ |
|
| 56 | public function setExecutor($executor) |
|
| 57 | { |
|
| 58 | $this->executor = $executor; |
|
| 59 | return $this; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * @ORM\Column(type="string", length=20) |
|
| 64 | */ |
|
| 65 | private $type; |
|
| 66 | ||
| 67 | /** |
|
| 68 | * @ORM\Column(type="string", length=100) |
|
| 69 | */ |
|
| 70 | private $executor; |
|
| 71 | ||
| 72 | /** |
|
| 73 | * @ORM\ManyToOne(inversedBy="widgets",targetEntity="AppBundle\Entity\Variable") |
|
| 74 | */ |
|
| 75 | private $variable; |
|
| 76 | ||
| 77 | /** |
|
| 78 | * @ORM\ManyToOne(inversedBy="hooks",targetEntity="AppBundle\Entity\Action") |
|
| 79 | */ |
|
| 80 | private $action; |
|
| 81 | ||
| 82 | /** |
|
| 83 | * @return mixed |
|
| 84 | */ |
|
| 85 | public function getArguments() |
|
| 86 | { |
|
| 87 | return $this->arguments; |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * @param mixed $arguments |
|
| 92 | * @return VarHook |
|
| 93 | */ |
|
| 94 | public function setArguments($arguments) |
|
| 95 | { |
|
| 96 | $this->arguments = $arguments; |
|
| 97 | return $this; |
|
| 98 | } |
|
| 99 | ||
| 100 | /** |
|
| 101 | * @ORM\Column(type="text") |
|
| 102 | */ |
|
| 103 | private $arguments; |
|
| 104 | ||
| 105 | /** |
|
| 106 | * @return Variable |
|
| 107 | */ |
|
| 108 | public function getVariable() |
|
| 109 | { |
|
| 110 | return $this->variable; |
|
| 111 | } |
|
| 112 | ||
| 113 | /** |
|
| 114 | * @param mixed $variable |
|
| 115 | * @return VarHook |
|
| 116 | */ |
|
| 117 | public function setVariable($variable) |
|
| 118 | { |
|
| 119 | $this->variable = $variable; |
|
| 120 | return $this; |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * @return mixed |
|
| 125 | */ |
|
| 126 | public function getId() |
|
| 127 | { |
|
| 128 | return $this->id; |
|
| 129 | } |
|
| 130 | ||
| 131 | /** |
|
| 132 | * @param mixed $id |
|
| 133 | * @return VarHook |
|
| 134 | */ |
|
| 135 | public function setId($id) |
|
| 136 | { |
|
| 137 | $this->id = $id; |
|
| 138 | return $this; |
|
| 139 | } |
|
| 140 | ||
| 141 | /** |
|
| 142 | * @return mixed |
|
| 143 | */ |
|
| 144 | public function getName() |
|
| 145 | { |
|
| 146 | return $this->name; |
|
| 147 | } |
|
| 148 | ||
| 149 | /** |
|
| 150 | * @param mixed $name |
|
| 151 | * @return VarHook |
|
| 152 | */ |
|
| 153 | public function setName($name) |
|
| 154 | { |
|
| 155 | $this->name = $name; |
|
| 156 | return $this; |
|
| 157 | } |
|
| 158 | ||
| 159 | /** |
|
| 160 | * @return mixed |
|
| 161 | */ |
|
| 162 | public function getAction() |
|
| 163 | { |
|
| 164 | return $this->action; |
|
| 165 | } |
|
| 166 | ||
| 167 | /** |
|
| 168 | * @param mixed $action |
|
| 169 | * @return VarHook |
|
| 170 | */ |
|
| 171 | public function setAction($action) |
|
| 172 | { |
|
| 173 | $this->action = $action; |
|
| 174 | return $this; |
|
| 175 | } |
|
| 176 | ||
| 177 | ||
| 178 | public function __toString() |
|
| 179 | { |
|
| 180 | return $this->getName(); |
|
| 181 | } |
|
| 182 | } |
|
| 183 | ||