|
@@ 150-161 (lines=12) @@
|
| 147 |
|
* @throws \InvalidArgumentException when the bundle is not enabled |
| 148 |
|
* @return \Zikula\Core\AbstractModule|\Zikula\Core\AbstractModule[] |
| 149 |
|
*/ |
| 150 |
|
public function getModule($moduleName, $first = true) |
| 151 |
|
{ |
| 152 |
|
if (!isset($this->moduleMap[$moduleName])) { |
| 153 |
|
throw new \InvalidArgumentException(sprintf('Module "%s" does not exist or it is not enabled.', $moduleName, get_class($this))); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
if (true === $first) { |
| 157 |
|
return $this->moduleMap[$moduleName][0]; |
| 158 |
|
} |
| 159 |
|
|
| 160 |
|
return $this->moduleMap[$moduleName]; |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
public function getModules() |
| 164 |
|
{ |
|
@@ 188-199 (lines=12) @@
|
| 185 |
|
* |
| 186 |
|
* @return AbstractTheme|AbstractTheme |
| 187 |
|
*/ |
| 188 |
|
public function getTheme($themeName, $first = true) |
| 189 |
|
{ |
| 190 |
|
if (!isset($this->themeMap[$themeName])) { |
| 191 |
|
throw new \InvalidArgumentException(sprintf('Theme "%s" does not exist or it is not enabled.', $themeName, get_class($this))); |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
if (true === $first) { |
| 195 |
|
return $this->themeMap[$themeName][0]; |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
return $this->themeMap[$themeName]; |
| 199 |
|
} |
| 200 |
|
|
| 201 |
|
public function getThemes() |
| 202 |
|
{ |