- /**
- * Confirm this object isn't attached to a template.
- * Returns TRUE if this action schedule isn't attached to a template.
- * Templates are (currently) unique to events, so we only evaluate those.
- *
- * @return bool;
- */
- private function notTemplate() {
- if ($this->mapping->getEntity() === 'civicrm_participant') {
- $entityId = $this->actionSchedule->entity_value;
- $query = new \CRM_Utils_SQL_Select('civicrm_event e');
- $sql = $query
- ->select('is_template')
- ->where("e.id = {$entityId}")
- ->toSQL();
- $dao = \CRM_Core_DAO::executeQuery($sql);
- return !(bool) $dao->fetchValue();
- }
- return TRUE;
- }
-