/** * A public method to return the required information about the report plugin. * * @return array An array providing information about the report class. * The details required to be set in the array are: * 'plugin-name' => The (translated) name of the plugin * 'plugin-description' => The (translated) description of the plugin * 'plugin-category' => The report category (eg. admin, advertiser, * agency, publisher) * 'plugin-category-name' => The (translated) name of the report category * 'plugin-author' => The name of the author * 'plugin-export' => The format the report is returned as * 'plugin-authorize' => The users authorised to run the report (eg. OA_ACCOUNT_ADMIN, * OA_ACCOUNT_MANAGER, etc) * 'plugin-import' => An array containing the details required to display the * report's input value form in the UI */ function infoArray() { $this->initInfo(); include_once MAX_PATH . '/lib/max/Plugin/Translation.php'; MAX_Plugin_Translation::init($this->module, $this->package); $aPluginInfo = array("plugin-name" => MAX_Plugin_Translation::translate($this->_name, $this->module, $this->package), "plugin-description" => MAX_Plugin_Translation::translate($this->_description, $this->module, $this->package), 'plugin-category' => $this->_category, 'plugin-category-name' => MAX_Plugin_Translation::translate($this->_categoryName, $this->module, $this->package), "plugin-author" => $this->_author, "plugin-export" => $this->_export, "plugin-authorize" => $this->_authorize, "plugin-import" => $this->_import); return $aPluginInfo; }
/** * Initialize translation files * * @param string $module * @param string $package */ function lazyInit($module, $package) { if (!isset($GLOBALS['_MAX']['PLUGIN_TRANSLATION'][$module])) { MAX_Plugin_Translation::init($module, $package); } if (!isset($GLOBALS['_MAX']['PLUGIN_TRANSLATION'][$module][$package])) { MAX_Plugin_Translation::init($module, $package); } }