Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-989

change plugin interface for menu links

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            scott.koranda.3@at.internet2.edu Scott Koranda SCG (Inactive)
            scott.koranda.3@at.internet2.edu Scott Koranda SCG (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: