From: Coleman Watts Date: Mon, 25 Nov 2019 12:36:15 +0000 (-0500) Subject: Remove unused functions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e45ab7b5b6bbbfd04d311a46492b1dc6fe783096;p=civicrm-core.git Remove unused functions These functions are no longer needed now that KAM is merged into core. --- diff --git a/CRM/Core/BAO/Navigation.php b/CRM/Core/BAO/Navigation.php index c3b14adf9c..c5d8300697 100644 --- a/CRM/Core/BAO/Navigation.php +++ b/CRM/Core/BAO/Navigation.php @@ -309,50 +309,6 @@ FROM civicrm_navigation WHERE domain_id = $domainID"; } } - /** - * Recursively check child menus. - * - * @param array $value - * @param string $navigationString - * @param array $skipMenuItems - * - * @return string - */ - public static function recurseNavigation(&$value, &$navigationString, $skipMenuItems) { - if (!empty($value['child'])) { - $navigationString .= ''; - if (isset($value['attributes']['separator']) && $value['attributes']['separator'] == 1) { - $navigationString .= ''; - } - } - return $navigationString; - } - /** * Given a navigation menu, generate navIDs for any items which are * missing them. @@ -401,55 +357,6 @@ FROM civicrm_navigation WHERE domain_id = $domainID"; } } - /** - * Check permissions and format menu item as html. - * - * @param $value - * @param array $skipMenuItems - * - * @return bool|string - */ - public static function getMenuName(&$value, &$skipMenuItems) { - // we need to localise the menu labels (CRM-5456) and don’t - // want to use ts() as it would throw the ts-extractor off - $i18n = CRM_Core_I18n::singleton(); - - $name = $i18n->crm_translate($value['attributes']['label'], ['context' => 'menu']); - $url = CRM_Utils_Array::value('url', $value['attributes']); - $parentID = CRM_Utils_Array::value('parentID', $value['attributes']); - $navID = CRM_Utils_Array::value('navID', $value['attributes']); - $active = CRM_Utils_Array::value('active', $value['attributes']); - $target = CRM_Utils_Array::value('target', $value['attributes']); - - if (in_array($parentID, $skipMenuItems) || !$active || !self::checkPermission($value['attributes'])) { - $skipMenuItems[] = $navID; - return FALSE; - } - - $makeLink = FALSE; - if (!empty($url)) { - $url = self::makeFullyFormedUrl($url); - $makeLink = TRUE; - } - - if (!empty($value['attributes']['icon'])) { - $menuIcon = sprintf('', $value['attributes']['icon']); - $name = $menuIcon . $name; - } - - if ($makeLink) { - $url = CRM_Utils_System::evalUrl($url); - if ($target) { - $name = "{$name}"; - } - else { - $name = "{$name}"; - } - } - - return $name; - } - /** * Check if a menu item should be visible based on permissions and component. *