civix@1.0`). * - They may be copied/reproduced in multiple extensions. * - They are de-duped - such that a major-version (eg `civix@1` or `civix@2`) is only loaded once. * * The "MixInfo" record tracks the mixins needed by an extension. You may consider this an * optimized subset of the 'info.xml'. (The mix-info is loaded on every page-view, so this * record is serialized and stored in the MixinLoader cache.) */ class CRM_Extension_MixInfo { /** * @var string * * Ex: 'org.civicrm.flexmailer' */ public $longName; /** * @var string * * Ex: 'flexmailer' */ public $shortName; /** * @var string|null * * Ex: '/var/www/modules/civicrm/ext/flexmailer'. */ public $path; /** * @var array * Ex: ['civix@2.0', 'menu@1.0'] */ public $mixins; /** * Get a path relative to the target extension. * * @param string $relPath * @return string */ public function getPath($relPath = NULL) { return $relPath === NULL ? $this->path : $this->path . DIRECTORY_SEPARATOR . ltrim($relPath, '/'); } public function isActive() { return \CRM_Extension_System::singleton()->getMapper()->isActiveModule($this->shortName); } }