Module: provide getApplicationDir()

This commit is contained in:
Thomas Gelf 2015-11-12 17:13:32 +01:00
parent 7a2824e070
commit f9a0e7dec6
1 changed files with 18 additions and 0 deletions

View File

@ -51,6 +51,13 @@ class Module
*/ */
private $cssdir; private $cssdir;
/**
* Base application directory
*
* @var string
*/
private $appdir;
/** /**
* Library directory * Library directory
* *
@ -244,6 +251,7 @@ class Module
$this->jsdir = $basedir . '/public/js'; $this->jsdir = $basedir . '/public/js';
$this->libdir = $basedir . '/library'; $this->libdir = $basedir . '/library';
$this->configdir = $app->getConfigDir('modules/' . $name); $this->configdir = $app->getConfigDir('modules/' . $name);
$this->appdir = $basedir . '/application';
$this->localedir = $basedir . '/application/locale'; $this->localedir = $basedir . '/application/locale';
$this->formdir = $basedir . '/application/forms'; $this->formdir = $basedir . '/application/forms';
$this->controllerdir = $basedir . '/application/controllers'; $this->controllerdir = $basedir . '/application/controllers';
@ -739,6 +747,16 @@ class Module
return $this->basedir; return $this->basedir;
} }
/**
* Get the module's application directory
*
* @return string
*/
public function getApplicationDir()
{
return $this->appdir;
}
/** /**
* Get the module's library directory * Get the module's library directory
* *