<?php

namespace ModulesGarden\HostingQuotaNotifications\App\Helper;
use \ModulesGarden\HostingQuotaNotifications\Core\ModuleConstants;
/**
 * Description of ScriptsHelper
 *
 * @author Artur Pilch <artur.pi@modulesgarden.com>
 */
class ScriptsHelper
{
    public static function getContentScript($name, $path = null)
    {
        if(!$path)
        {
            $modulePath = ModuleConstants::getModuleRootDir();
            $path = $modulePath.DIRECTORY_SEPARATOR.'templates'.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'js'.DIRECTORY_SEPARATOR;
            
        }
        $file_path = $path.$name.'.js';
        
        $content = file_get_contents($file_path);
        return $content;
    }
    
    
}
