'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', ]); } }