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