| @@ 126-134 (lines=9) @@ | ||
| 123 | /** |
|
| 124 | * Disable the current module. |
|
| 125 | */ |
|
| 126 | public function disable(): void |
|
| 127 | { |
|
| 128 | $this->fireEvent('disabling'); |
|
| 129 | ||
| 130 | $this->getModel()->where(['name' => $this->getName()])->update(['is_active' => 0]); |
|
| 131 | $this->flushCache(); |
|
| 132 | ||
| 133 | $this->fireEvent('disabled'); |
|
| 134 | } |
|
| 135 | ||
| 136 | /** |
|
| 137 | * Enable the current module. |
|
| @@ 139-147 (lines=9) @@ | ||
| 136 | /** |
|
| 137 | * Enable the current module. |
|
| 138 | */ |
|
| 139 | public function enable(): void |
|
| 140 | { |
|
| 141 | $this->fireEvent('enabling'); |
|
| 142 | ||
| 143 | $this->getModel()->where(['name' => $this->getName()])->update(['is_active' => 1]); |
|
| 144 | $this->flushCache(); |
|
| 145 | ||
| 146 | $this->fireEvent('enabled'); |
|
| 147 | } |
|
| 148 | ||
| 149 | /** |
|
| 150 | * Delete the current module. |
|