/** * Return list of module directories which contain class files * * @return array */ protected function getClassDirs() { return array(\Includes\Utils\ModulesManager::getAbsoluteDir($this->module->getAuthor(), $this->module->getName())); }
/** * Get yaml files name to run common helper 'add_labels' * * @return string */ protected function getCommonHelperAddLabelsFiles() { list($author, $name) = explode('\\', $this->getActualName()); $result = array(); $dir = \Includes\Utils\ModulesManager::getAbsoluteDir($author, $name); $file = $dir . 'install.yaml'; if (\Includes\Utils\FileManager::isExists($file)) { $result[] = $file; } foreach ((array) glob($dir . 'install_*.yaml') as $translationFile) { if (\Includes\Utils\FileManager::isExists($translationFile)) { $result[] = $translationFile; } } return $result; }
/** * Return path where the upgrade helper scripts are placed * * @return string */ protected function getUpgradeHelperPath() { list($author, $name) = explode('\\', $this->getActualName()); return \Includes\Utils\FileManager::getRelativePath(\Includes\Utils\ModulesManager::getAbsoluteDir($author, $name), LC_DIR_ROOT) . LC_DS; }
/** * Hook "init" * * @return void */ public function invokeHookInit() { include_once \Includes\Utils\ModulesManager::getAbsoluteDir('CDev', 'DrupalConnector') . 'Drupal' . LC_DS . 'Include' . LC_DS . 'Callbacks.php'; if (defined('DRUPAL_ROOT') && !\XLite\Core\Config::getInstance()->CDev->DrupalConnector->drupal_root_path) { \XLite\Core\Database::getRepo('XLite\\Model\\Config')->createOption(array('name' => 'drupal_root_path', 'category' => 'CDev\\DrupalConnector', 'value' => DRUPAL_ROOT)); } }