php - How to remove asset which was in layout on particular page in ZF2 -


i have asset set in layout.phtml globally on website:

$this->inlinescript()     ->offsetsetfile(4, $this->basepath('crm-assets/js/permissions.js')) 

how remove file on particular page on website?

is there methods this: $this->inlinescript()->unset(4)?

the view helper inherits zend\view\helper\placeholder\container\abstractstandalone implements arrayobject , proxies all calls 'collection' manages.

normally use unset() function

$helper = $this->inlinescript(); unset($helper->somekey} 

however key integer need call offsetunset() internal container.

$helper->getcontainer()->offsetunset(4); 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -