Jarves\Jarves::resolveInternalPublicPath PHP Method

resolveInternalPublicPath() public method

('@JarvesBundle/admin/js/test.js') => /var/www/jarves/src/Jarves/Resources/public/admin/js/test.js
public resolveInternalPublicPath ( string $path ) : mixed
$path string
return mixed
    public function resolveInternalPublicPath($path)
    {
        return $this->resolvePath($path, 'Resources/public');
    }

Usage Example

Example #1
0
 public function appendAngularTemplates()
 {
     $response = $this->pageStack->getPageResponse();
     foreach ($this->jarves->getConfigs() as $bundle) {
         $templates = $bundle->getAdminAngularTemplatesInfo();
         foreach ($templates as $template) {
             $publicPath = $this->jarves->resolvePublicWebPath($template->getPath());
             $localPath = $this->jarves->resolveInternalPublicPath($template->getPath());
             $content = file_get_contents($localPath);
             $content = str_replace('</script>', '', $content);
             $response->addHeader('<script type="text/ng-template" id="' . $publicPath . '">' . $content . '</script>');
         }
     }
 }
All Usage Examples Of Jarves\Jarves::resolveInternalPublicPath