*/
static public function getEntitiesForParent($parentId, $entityTable, $includeParent = TRUE, $mode = 3, $initiatorId = NULL) {
$entities = array();
+ if (empty($parentId) || empty($entityTable)) {
+ return $entities;
+ }
if (!$initiatorId) {
$initiatorId = $parentId;
* @return int unsigned $parentId Parent ID
*/
static public function getParentFor($entityId, $entityTable, $includeParent = TRUE) {
+ if (empty($entityId) || empty($entityTable)) {
+ return NULL;
+ }
+
$query = "
SELECT parent_id
FROM civicrm_recurring_entity