CRM_Extension_Mapper
class CRM_Extension_Mapper
This class proivdes various helper functions for locating extensions data. It's designed for compatibility with pre-existing functions from CRM_Core_Extensions.
Most of these helper functions originate with the first major iteration of extensions -- a time when every extension had one eponymous PHP class, when there was no PHP class-loader, and when there was special-case logic sprinkled around to handle loading of "extension classes".
With module-extensions (Civi 4.2+), there are no eponymous classes -- instead, module-extensions follow the same class-naming and class-loading practices as core (and don't require special-case logic for class loading). Consequently, the helpers in here aren't much used with module-extensions.
Constants
EXT_TEMPLATES_DIRNAME |
Extension info file name. |
Properties
protected CRM_Extension_Container_Interface | $container | ||
protected array | $infos | ||
protected array | $moduleExtensions | ||
protected CRM_Utils_Cache_Interface | $cache | ||
protected | $cacheKey | ||
protected | $civicrmPath | ||
protected | $civicrmUrl |
Methods
No description
Given the class, provides extension's key.
Given the class, provides extension path.
Given the string, returns true or false if it's an extension key.
Given the string, returns true or false if it's an extension class name.
No description
Given the key, provides extension's class name.
Given the key, provides the path to file containing extension's main class.
Given the key, provides the path to file containing extension's main class.
Given the key, provides the path to file containing extension's main class.
Fetch the list of active extensions of type 'module'
Get a list of base URLs for all active modules.
Get a list of extension keys, filtered by the corresponding file path.
No description
No description
Get a list of all installed modules, including enabled and disabled ones
Given the class, provides the template path.
Given te class, provides the template name.
No description
Details
at line 91
__construct(CRM_Extension_Container_Interface $container, CRM_Utils_Cache_Interface $cache = NULL, null $cacheKey = NULL, null $civicrmPath = NULL, null $civicrmUrl = NULL)
at line 121
string
classToKey(string $clazz)
Given the class, provides extension's key.
at line 134
string
classToPath($clazz)
Given the class, provides extension path.
at line 150
bool
isExtensionKey(string $key)
Given the string, returns true or false if it's an extension key.
at line 165
bool
isExtensionClass(string $clazz)
Given the string, returns true or false if it's an extension class name.
at line 182
CRM_Extension_Info
keyToInfo(string $key, bool $fresh = FALSE)
at line 208
string
keyToClass(string $key)
Given the key, provides extension's class name.
at line 223
string
keyToPath(string $key)
Given the key, provides the path to file containing extension's main class.
at line 237
string
keyToBasePath(string $key)
Given the key, provides the path to file containing extension's main class.
at line 255
string
keyToUrl(string $key)
Given the key, provides the path to file containing extension's main class.
at line 277
array
getActiveModuleFiles(bool $fresh = FALSE)
Fetch the list of active extensions of type 'module'
at line 335
array
getActiveModuleUrls()
Get a list of base URLs for all active modules.
at line 359
array
getKeysByPath(string $pattern)
Get a list of extension keys, filtered by the corresponding file path.
at line 389
array
getAllInfos()
at line 401
bool
isActiveModule(string $name)
at line 417
array
getModules()
Get a list of all installed modules, including enabled and disabled ones
at line 438
string
getTemplatePath(string $clazz)
Given the class, provides the template path.
at line 460
string
getTemplateName(string $clazz)
Given te class, provides the template name.