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
Post a Comment