/** * Return URL for module icon * * @return string */ public static function getIconURL() { list($author, $name) = explode('\\', \Includes\Utils\ModulesManager::getModuleNameByClassName(get_called_class())); $path = \Includes\Utils\ModulesManager::getModuleIconFile($author, $name); $url = ''; if (\Includes\Utils\FileManager::isFileReadable($path)) { $url = \XLite\Core\Converter::buildURL('module', null, compact('author', 'name'), 'image.php'); } return $url; }
/** * Return name of the module where the class defined * * @return string */ public function getModuleName() { return \Includes\Utils\ModulesManager::getModuleNameByClassName($this->getClass()); }