X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=ext%2Fckeditor4%2Fckeditor4.civix.php;h=bb862286b56836f51e6b785381edfeb09c06c4d8;hb=88bed5e9ee481ec073874c77a70bf0d5b133b13c;hp=31e512ab5cec45f1d9ddb147ffc9fa1d24291409;hpb=438ad1e29e8c68578e2d2070df52c0315688c27f;p=civicrm-core.git diff --git a/ext/ckeditor4/ckeditor4.civix.php b/ext/ckeditor4/ckeditor4.civix.php index 31e512ab5c..bb862286b5 100644 --- a/ext/ckeditor4/ckeditor4.civix.php +++ b/ext/ckeditor4/ckeditor4.civix.php @@ -107,19 +107,6 @@ function _ckeditor4_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _ckeditor4_civix_civicrm_xmlMenu(&$files) { - foreach (_ckeditor4_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * @@ -217,64 +204,6 @@ function _ckeditor4_civix_upgrader() { } } -/** - * Search directory tree for files which match a glob pattern. - * - * Note: Dot-directories (like "..", ".git", or ".svn") will be ignored. - * Note: Delegate to CRM_Utils_File::findFiles(), this function kept only - * for backward compatibility of extension code that uses it. - * - * @param string $dir base dir - * @param string $pattern , glob pattern, eg "*.txt" - * - * @return array - */ -function _ckeditor4_civix_find_files($dir, $pattern) { - return CRM_Utils_File::findFiles($dir, $pattern); -} - -/** - * (Delegated) Implements hook_civicrm_managed(). - * - * Find any *.mgd.php files, merge their content, and return. - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_managed - */ -function _ckeditor4_civix_civicrm_managed(&$entities) { - $mgdFiles = _ckeditor4_civix_find_files(__DIR__, '*.mgd.php'); - sort($mgdFiles); - foreach ($mgdFiles as $file) { - $es = include $file; - foreach ($es as $e) { - if (empty($e['module'])) { - $e['module'] = E::LONG_NAME; - } - if (empty($e['params']['version'])) { - $e['params']['version'] = '3'; - } - $entities[] = $e; - } - } -} - -/** - * Glob wrapper which is guaranteed to return an array. - * - * The documentation for glob() says, "On some systems it is impossible to - * distinguish between empty match and an error." Anecdotally, the return - * result for an empty match is sometimes array() and sometimes FALSE. - * This wrapper provides consistency. - * - * @link http://php.net/glob - * @param string $pattern - * - * @return array - */ -function _ckeditor4_civix_glob($pattern) { - $result = glob($pattern); - return is_array($result) ? $result : []; -} - /** * Inserts a navigation menu item at a given place in the hierarchy. *