'RelateEntities', 'class' => 'CRM_RelateEntities_DAO_RelateEntities', 'table' => 'civicrm_relate_entities', ]; } /** * Implements hook_civicrm_thems(). */ function relateentities_civicrm_themes(&$themes) { _relateentities_civix_civicrm_themes($themes); } /** * Implements hook_civicrm_tabset(). * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_tabset */ function relateentities_civicrm_tabset($tabsetName, &$tabs, $context) { if ('civicrm/contact/view' == $tabsetName) { $tabs[] = [ 'id' => 'relateentities', 'url' => CRM_Utils_System::url( 'civicrm/relateentities/list', "reset=1&entityId={$context['contact_id']}&entityTable=Contact" ), 'title' => ts('Related Entities'), 'weight' => '35', 'count' => CRM_RelateEntities_Utils::getRelatedEntities( 'Contact', $context['contact_id'], FALSE, TRUE ), 'class' => 'livePage', 'icon' => 'crm-i fa-handshake-o', ]; } } function relateentities_civicrm_pageRun(&$page) { if (is_a($page, 'CRM_Financial_Page_FinancialType')) { $page->assign('entityTable', 'FinancialType'); $financialTypes = $page->get_template_vars('rows'); foreach ($financialTypes as &$financialType) { $url = CRM_Utils_System::url( 'civicrm/relateentities/list', "reset=1&entityTable=FinancialType&entityId={$financialType['id']}" ); $financialType['expand'] = ''; } $page->assign('rows', $financialTypes); CRM_Core_Region::instance('page-body')->add([ 'template' => 'CRM/RelateEntities/Expand.tpl', ]); } }