Remove unused hook_civicrm_crudLink and switch to using metadata for generating crudLinks
authorColeman Watts <coleman@civicrm.org>
Tue, 3 Nov 2020 17:11:56 +0000 (12:11 -0500)
committerColeman Watts <coleman@civicrm.org>
Tue, 3 Nov 2020 17:11:56 +0000 (12:11 -0500)
commit002f5eaf8bee947f1eea6ea157d8f2f846d41bd7
tree49f4e71f3f72710ce2097dcc5d82200a439dfe0d
parent4d660b8e1e6ac980a06b096fbc4cde1e1666e0b9
Remove unused hook_civicrm_crudLink and switch to using metadata for generating crudLinks

The hook civicrm_crudLink is unused according to a grep of 'civicrm_universe',
and the function CRM_Utils_System::createDefaultCrudLink had poor entity coverage
(it could only generate links for the Contact entity).
Switching that function to use the new 'paths' metadata vastly improves coverage.
CRM/Contact/BAO/Contact.php
CRM/Core/Smarty/plugins/function.crmCrudLink.php
CRM/Utils/Hook.php
CRM/Utils/System.php
tests/phpunit/CRM/Utils/SystemTest.php