[#42] added stats

This commit is contained in:
B. Endres 2022-05-12 13:25:53 +02:00
parent b5b34ff678
commit 65424ab4bc
3 changed files with 30 additions and 2 deletions

View file

@ -18,7 +18,8 @@ use CRM_Twingle_ExtensionUtil as E;
class CRM_Twingle_Page_Profiles extends CRM_Core_Page {
public function run() {
$profiles = array();
CRM_Utils_System::setTitle(E::ts("Twingle API Profiles"));
$profiles = [];
foreach (CRM_Twingle_Profile::getProfiles() as $profile_name => $profile) {
$profiles[$profile_name]['name'] = $profile_name;
foreach (CRM_Twingle_Profile::allowedAttributes() as $attribute) {
@ -26,6 +27,7 @@ class CRM_Twingle_Page_Profiles extends CRM_Core_Page {
}
}
$this->assign('profiles', $profiles);
$this->assign('profile_stats', CRM_Twingle_Profile::getProfileStats());
parent::run();
}