|
@@ 105-116 (lines=12) @@
|
| 102 |
|
* @throws \InvalidArgumentException when the bundle is not enabled |
| 103 |
|
* @return \Zikula\Core\AbstractModule|\Zikula\Core\AbstractModule[] |
| 104 |
|
*/ |
| 105 |
|
public function getModule($moduleName, $first = true) |
| 106 |
|
{ |
| 107 |
|
if (!isset($this->moduleMap[$moduleName])) { |
| 108 |
|
throw new \InvalidArgumentException(sprintf('Module "%s" does not exist or it is not enabled.', $moduleName, get_class($this))); |
| 109 |
|
} |
| 110 |
|
|
| 111 |
|
if (true === $first) { |
| 112 |
|
return $this->moduleMap[$moduleName][0]; |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
return $this->moduleMap[$moduleName]; |
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
public function getModules() |
| 119 |
|
{ |
|
@@ 133-144 (lines=12) @@
|
| 130 |
|
* |
| 131 |
|
* @return AbstractTheme|AbstractTheme |
| 132 |
|
*/ |
| 133 |
|
public function getTheme($themeName, $first = true) |
| 134 |
|
{ |
| 135 |
|
if (!isset($this->themeMap[$themeName])) { |
| 136 |
|
throw new \InvalidArgumentException(sprintf('Theme "%s" does not exist or it is not enabled.', $themeName, get_class($this))); |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
if (true === $first) { |
| 140 |
|
return $this->themeMap[$themeName][0]; |
| 141 |
|
} |
| 142 |
|
|
| 143 |
|
return $this->themeMap[$themeName]; |
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
public function getThemes() |
| 147 |
|
{ |