lajax\translatemanager\Module::getLanguageItemsDirPath PHP Method

getLanguageItemsDirPath() public method

public getLanguageItemsDirPath ( ) : string
return string The full path of the directory containing the generated JavaScript files.
    public function getLanguageItemsDirPath()
    {
        return Yii::getAlias($this->tmpDir) . $this->subDir;
    }

Usage Example

 /**
  * @param \lajax\translatemanager\Module $module
  * @param string $language_id Language of the file to be generated.
  */
 public function __construct($module, $language_id)
 {
     $this->_languageId = $language_id;
     $this->_basePath = Yii::getAlias($module->tmpDir);
     if (!is_dir($this->_basePath)) {
         throw new InvalidConfigException("The directory does not exist: {$this->_basePath}");
     } elseif (!is_writable($this->_basePath)) {
         throw new InvalidConfigException("The directory is not writable by the Web process: {$this->_basePath}");
     }
     $this->_basePath = $module->getLanguageItemsDirPath();
     if (!is_dir($this->_basePath)) {
         mkdir($this->_basePath);
     }
     if (!is_writable($this->_basePath)) {
         throw new InvalidConfigException("The directory is not writable by the Web process: {$this->_basePath}");
     }
 }