private function createAssetPath($path, $module, $absolute, $fromAssets)
    {
        $baseUrl = '';

        if ($absolute === true) {
            $url = $baseUrl;
        } else {
            $url = null;
        }

        // If module isn't provided, then current one used by default
        if (is_null($module)) {
            $module = $this->module;
        }

        if ($fromAssets !== false) {
            $dir = self::TEMPLATE_PARAM_ASSETS_DIR;
            $theme = null;
        } else {
            $dir = self::TEMPLATE_PARAM_BASE_DIR;
            $theme = $this->theme;
        }

        return $url.sprintf('%s/%s', $this->createPath($dir, $baseUrl, $module, $theme), $path);
    }
private function createAssetPath($path, $module, $absolute, $fromAssets)
    {
        $baseUrl = '';

        if ($absolute === true) {
            $url = $baseUrl;
        } else {
            $url = null;
        }

        // If module isn't provided, then current one used by default
        if (is_null($module)) {
            $module = $this->module;
        }

        if ($fromAssets !== false) {
            $dir = self::TEMPLATE_PARAM_ASSETS_DIR;
            $theme = null;
        } else {
            $dir = self::TEMPLATE_PARAM_BASE_DIR;
            $theme = $this->theme;
        }

        return $url.sprintf('%s/%s', $this->createPath($dir, $baseUrl, $module, $theme), $path);
    }
private function createAssetPath ( $ path , $ module , $ absolute , $ fromAssets ) { $ baseUrl = '' ; if ( $ absolute === true ) { $ url = $ baseUrl ; } else { $ url = null ; } // If module isn't provided, then current one used by default if ( is_null ( $ module ) ) { $ module = $ this -> module ; } if ( $ fromAssets !== false ) { $ dir = self :: TEMPLATE_PARAM_ASSETS_DIR ; $ theme = null ; } else { $ dir = self :: TEMPLATE_PARAM_BASE_DIR ; $ theme = $ this -> theme ; } return $ url . sprintf ( '%s/%s' , $ this -> createPath ( $ dir , $ baseUrl , $ module , $ theme ) , $ path ) ; }
Returns asset path by module and its nested path

@param string $path
@param string $module Optionally default module can be replaced by another one
@param boolean $absolute Whether returned path should be absolute or relative
@param boolean $fromAssets Whether to use assets directory or theme's internal one
@return string
Returns asset path by module and its nested path