Move Module::__construct to the top of the function list

refs #9664
This commit is contained in:
Eric Lippmann 2015-07-24 14:19:17 +02:00
parent e1357c1386
commit ec1ddd82b3
1 changed files with 25 additions and 25 deletions

View File

@ -102,7 +102,7 @@ class Module
/**
* Module metadata (version...)
*
* @var stdClass
* @var object
*/
private $metadata;
@ -199,6 +199,30 @@ class Module
*/
protected $userGroupBackends = array();
/**
* Create a new module object
*
* @param ApplicationBootstrap $app
* @param string $name
* @param string $basedir
*/
public function __construct(ApplicationBootstrap $app, $name, $basedir)
{
$this->app = $app;
$this->name = $name;
$this->basedir = $basedir;
$this->cssdir = $basedir . '/public/css';
$this->jsdir = $basedir . '/public/js';
$this->libdir = $basedir . '/library';
$this->configdir = $app->getConfigDir('modules/' . $name);
$this->localedir = $basedir . '/application/locale';
$this->formdir = $basedir . '/application/forms';
$this->controllerdir = $basedir . '/application/controllers';
$this->runScript = $basedir . '/run.php';
$this->configScript = $basedir . '/configuration.php';
$this->metadataFile = $basedir . '/module.info';
}
/**
* Provide a search URL
*
@ -280,30 +304,6 @@ class Module
return $this->menuItems[$name];
}
/**
* Create a new module object
*
* @param ApplicationBootstrap $app
* @param string $name
* @param string $basedir
*/
public function __construct(ApplicationBootstrap $app, $name, $basedir)
{
$this->app = $app;
$this->name = $name;
$this->basedir = $basedir;
$this->cssdir = $basedir . '/public/css';
$this->jsdir = $basedir . '/public/js';
$this->libdir = $basedir . '/library';
$this->configdir = $app->getConfigDir('modules/' . $name);
$this->localedir = $basedir . '/application/locale';
$this->formdir = $basedir . '/application/forms';
$this->controllerdir = $basedir . '/application/controllers';
$this->runScript = $basedir . '/run.php';
$this->configScript = $basedir . '/configuration.php';
$this->metadataFile = $basedir . '/module.info';
}
/**
* Register module
*