Skip to content

Commit

Permalink
make Module::checkSettingsInstalled() static so it can be reused outs…
Browse files Browse the repository at this point in the history
…ide module instance scope
  • Loading branch information
handcode committed Nov 12, 2021
1 parent 4f358c5 commit ad77222
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function init()
parent::init();

// add routes from settings module
if ($this->checkSettingsInstalled()) {
if (self::checkSettingsInstalled()) {
$routes = explode("\n", \Yii::$app->settings->get('pages.availableRoutes'));
foreach ($routes as $route) {
$routeEntry = trim($route);
Expand Down Expand Up @@ -130,7 +130,7 @@ public function getLocalizedRootNode()
* Check for "pheme/yii2-settings" component and module
* @return bool
*/
private function checkSettingsInstalled()
public static function checkSettingsInstalled()
{
return \Yii::$app->hasModule('settings') && \Yii::$app->has('settings');
}
Expand Down

0 comments on commit ad77222

Please sign in to comment.