Feature request from brideo, posted on GitHub Nov 13, 2015
http://php.net/manual/en/language.oop5.late-static-bindings.php
Rather than this:
/**
* @return bool
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed(self::ADMIN_RESOURCE);
}
We should have this:
/**
* @return bool
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed(static::ADMIN_RESOURCE);
}
By using a static binding, we don't have to completely re-write the _isAllowed
method in our controller action, instead we can simply define our ADMIN_RESOURCE
constant, we then can let the AbstractAction
handle our logic.
This would be a completely backwards compatible change.