Get assets path of speciic module

@param string|null $moduleName name of module
@return string
198640
public function getAssetDirectory($moduleName = null)
    {
        if ($moduleName)
            return public_path().'/'.$this->getConfig('assets').'/'.$moduleName;

        return public_path().'/'.$this->getConfig('assets').'/';
    }
271590
public function getModulePath($module)
    {
        try {
            return $this->findOrFail($module)->getPath() . '/';
        } catch (ModuleNotFoundException $e) {
            return $this->getPath() . '/' . Str::studly($module) . '/';
        }
    }
446285
protected function resolveAssets(): ?string
    {
        $module = $this->getModuleInfo();
        if (!isset($module['assets'])) {
            return null;
        }
        $directory = $this->directory() . DIRECTORY_SEPARATOR . trim($module['assets'], DIRECTORY_SEPARATOR);
        return is_dir($directory) ? realpath($directory) : null;
    }
1305014
public function getFilePath($filename)
    {
        if (modules()) {
            $filePaths = modules()->getDirs('Views');
        } else {
            $filePaths = array_reverse($this->filePaths);
        }

        foreach ($filePaths as $filePath) {
            if (is_file($filePath . $filename . '.phtml')) {
                return $filePath . $filename . '.phtml';
                break;
            } elseif (is_file($filePath . 'errors' . DIRECTORY_SEPARATOR . $filename . '.phtml')) {
                return $filePath . 'errors' . DIRECTORY_SEPARATOR . $filename . '.phtml';
                break;
            }
        }
    }
812340
public function dump($fileName)
    {
        $fileDir = $this->assetsResolver->resolveAssetSourcePath($this->module->getCode(), false, $fileName, $this->parser);

        if (null !== $fileDir) {
            $content = file_get_contents($fileDir . DS . $fileName);
            if (false === $content) {
                $content = "";
            }
        } else {
            $content = sprintf("ERR: Unknown file %s for module %s", $fileName, $this->module->getCode());
        }

        return $content;
    }
634533
public function getModuleByName(string $moduleName): \BFW\Module
    {
        if ($this->hasModule($moduleName) === false) {
            throw new Exception(
                'The Module '.$moduleName.' has not been found.',
                $this::ERR_NOT_FOUND
            );
        }

        return $this->modules[$moduleName];
    }
631976
public function get($name)
    {
        return isset($this->modules[$name]) ? $this->modules[$name] : null;
    }
669624
public function getModulePath()
    {
        if ($this->_modulePath !== null) {
            return $this->_modulePath;
        } else {
            return $this->_modulePath = $this->getBasePath() . DIRECTORY_SEPARATOR . 'Modules';
        }
    }
16904
public static function assets($assetName = null)
	{
		//get the server name from global $_SERVER[] array()
		$base  = $_SERVER['SERVER_NAME']; 

		$url = Registry::getUrl();

		//check if there is a uri string
		if ( ! empty($url) ) 
		{
			//prepend installation folder to server name
			$base .= substr($_SERVER['REQUEST_URI'], 0,  strpos($_SERVER['REQUEST_URI'], Registry::getUrl()));

		}
		//there is no query string, 
		else
		{
			//prepend installation folder to server name
			$base .= substr($_SERVER['REQUEST_URI'], 0);

		}


    	//use https if its defined in the $_SERVER global variable
    	$protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off") ? "https" : "http";

		//compose the url string
		return $protocol . '://' . $base . 'public/' . $assetName;

	}
550752
public function getRequiredModules($moduleName) {
        $moduleName = strtolower($moduleName);
        if (isset($this->_requiredModules[$moduleName])) {
            return $this->_requiredModules[$moduleName];
        }
        else {
            return null;
        }
    }
469392
public function getFilePath($fileName)
    {
        if (file_exists(storage_path('app/'.$fileName))) {
            $filePath = storage_path('app/'.$fileName);
        } else {
            $filePath = Storage::disk(config('cms.storage-location', 'local'))->url($fileName);
        }

        return $filePath;
    }
1177139
public function getModuleUri(string $moduleName, string $type = 'modern', $config = null)
    {
        return Template::raw(
            Twigpack::$plugin->manifest->getModule($moduleName, $type, $config)
        );
    }
723863
public function moduleContent($moduleName)
    {
        if ($this->isAdminContext() || empty($moduleName) || count($this->getEnvOptions()) === 0 || !Yii::$app->hasModule($moduleName)) {
            return;
        }
        
        // get module
        $module = Yii::$app->getModule($moduleName);
        $module->context = 'cms';
        
        // start module reflection
        $reflection = Yii::createObject(['class' => ModuleReflection::class, 'module' => $module]);
        $reflection->suffix = $this->getEnvOption('restString');

        $args = Json::decode($this->getCfgValue('moduleActionArgs', '{}'));
        
        // if a controller has been defined we inject a custom starting route for the
        // module reflection object.
        $ctrl = $this->getCfgValue('moduleController');
        if (!empty($ctrl)) {
            $reflection->defaultRoute($ctrl, $this->getCfgValue('moduleAction', 'index'), $args);
        }
        
        if ($this->getCfgValue('strictRender')) {
            $reflection->setRequestRoute(implode("/", [$this->getCfgValue('moduleController', $module->defaultRoute), $this->getCfgValue('moduleAction', 'index')]), $args);
        } else {
            Yii::$app->request->queryParams = array_merge($reflection->getRequestRoute()['args'], Yii::$app->request->queryParams);
        }

        $response = $reflection->run();
        
        if ($response instanceof Response) {
            return Yii::$app->end(0, $response);
        }
        
        return $response;
    }
1093478
function getScriptPath()
    {
        $fileName = $this->stack->pop();
        if ($this->baseDir) {
            return $this->baseDir . \DIRECTORY_SEPARATOR . $fileName;
        } else {
            return (string)$fileName;
        }
    }
504737
public function path($filename)
    {
        if (preg_match('~^' . $this->base_directory . '~', $filename)) {
            return $filename;
        }

        return rtrim($this->base_directory, '/') . '/' . ltrim($filename, '/');
    }
208593
protected function getRealAssetName($assetName)
    {
        $prefix = 0 === strpos($assetName, '?') ? '?' : '';
        $assetName = ltrim($assetName, '?');

        if (null !== $this->replacementManager && $this->replacementManager->hasReplacement($assetName)) {
            $assetName = $this->replacementManager->getReplacement($assetName);
        }

        return $prefix.$assetName;
    }
792504
public function getProjectModulePathByModuleName(string $moduleName, PathTransfer $pathTransfer): string
    {
        return $pathTransfer->getProjectPath() . $moduleName . DIRECTORY_SEPARATOR;
    }