ManagedEntities - Always delete managed record when deleting an entity
authorColeman Watts <coleman@civicrm.org>
Fri, 5 Nov 2021 21:45:24 +0000 (17:45 -0400)
committerColeman Watts <coleman@civicrm.org>
Sat, 6 Nov 2021 19:23:17 +0000 (15:23 -0400)
commita2bf5923cd5bb6dedac554931190598e7a6b8f2e
treea83a5ab77762e2cce56b5ce94a7e44a2734883d4
parent1ce6ee5a3b6a9408e085a70f7fd3bd5dfa411db2
ManagedEntities - Always delete managed record when deleting an entity

This uses hooks to ensure managed records are always cleared out when an entity is deleted.
Fixes OptionValue::delete which was previously not calling hooks.
CRM/Core/BAO/Managed.php [new file with mode: 0644]
CRM/Core/BAO/OptionValue.php
CRM/Core/ManagedEntities.php
tests/phpunit/CRM/Core/ManagedEntitiesTest.php
tests/phpunit/api/v4/Entity/ManagedEntityTest.php