FireEvent in MessageController class for _GetAssetData and _GetLocationData
Hi,
I am really excited to use Garden framework. Its a really cool app. It will make the developers life very easy. I like the way Vanilla is separated from Garden. But one thing that I have noticed in MessageController class that _GetLocationData directly adds the Vanilla discussion page option. Instead of this can we have FireEvent in _GetAssetData and _GetLocationData so that other apps can easily register their option for displaying message in their own defined asset.
Anyways a really really cool app to work on! Looking forward to develop some cool apps on it.
I am really excited to use Garden framework. Its a really cool app. It will make the developers life very easy. I like the way Vanilla is separated from Garden. But one thing that I have noticed in MessageController class that _GetLocationData directly adds the Vanilla discussion page option. Instead of this can we have FireEvent in _GetAssetData and _GetLocationData so that other apps can easily register their option for displaying message in their own defined asset.
Anyways a really really cool app to work on! Looking forward to develop some cool apps on it.
Tagged:
0
Comments
I've altered the code in my dev version (to be pushed to GitHub tonight or tomorrow):
protected function _GetAssetData() {
$AssetData = array();
$AssetData['Content'] = 'Above Main Content';
$AssetData['Panel'] = 'Below Sidebar';
$this->EventArguments['AssetData'] = &$AssetData;
$this->FireEvent('GetAssetDataAfter');
return $AssetData;
}
protected function _GetLocationData() {
$ControllerData = array();
$ControllerData['Garden/Settings/Index'] = 'Dashboard';
$ControllerData['Garden/Profile/Index'] = 'Profile Page';
$ControllerData['Vanilla/Discussions/Index'] = 'Discussions Page';
$ControllerData['Vanilla/Discussion/Index'] = 'Comments Page';
$ControllerData['Base'] = 'Every Page';
$this->EventArguments['ControllerData'] = &$ControllerData;
$this->FireEvent('GetLocationDataAfter');
return $ControllerData;
}