Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
COmanage Registry 0.9.1 (Essential Enneagon Plus One)
Description
Currently plugins are supposed to set the public property $cmPluginMenus to expose menu items for the plugin. Since PHP class properties can only be declared using values that are evaluated at compile time the following will not work:
// Expose Menu Items
public $cmPluginMenus = array(
"coperson" => array(_txt('pl.dirviewer.viewmenu') =>
array('controller' => "dir_viewers",
'action' => "view"))
);
Continuing to just have the interface inspect $cmPluginMenus would require putting any non-static description of the menus into a __constructor() method.
Rather than using a __constructor() method, we will change the interface so that the Registry core code base calls the method
public function cmPluginMenus()
{ $menus = array() // Code to set menu content here. return $menus; }to obtain the menu information from the plugin.