The users of my application have an authority level. All levels ought to be able to view a table called "Applications" but for some levels I would like to override the main column block to display different information within the same table tab.
The behaviour I'm looking for is comparable to delegating to a superclass, however this isn't feasible as the table delegate class has no superclass. Here's what I mean:
- Code: Select all
function block__main_column() {
$user = Dataface_AuthenticationTool::getInstance()->getLoggedInUser();
$authority = $user->val('Authority');
if ($authority == 'Overridden Behaviour') {
//Perform custom main_column decoration here
} else if ($authority == 'Normal Behaviour') {
parent::block__main_column();
}
}
Considering that the "parent::block__main_column();" call cannot be performed (due to lack of a superclass), how ought I go about imitating the above mechanism?
Thanks in advance!
-Gersh