From: JKingsnorth Date: Fri, 6 Nov 2015 14:10:19 +0000 (+0000) Subject: CRM-16676 Further refactoring, unused method X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=db0a57d757c7b876556087dc377f074b1f987b1c;p=civicrm-core.git CRM-16676 Further refactoring, unused method --- diff --git a/CRM/Event/Form/ManageEvent/EventInfo.php b/CRM/Event/Form/ManageEvent/EventInfo.php index 1e210b94ce..c1283fab55 100644 --- a/CRM/Event/Form/ManageEvent/EventInfo.php +++ b/CRM/Event/Form/ManageEvent/EventInfo.php @@ -305,33 +305,4 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent { return ts('Event Information and Settings'); } - /** - * Retrieve event template custom data values and set as default values for current new event. - * - * @param int $templateId - * Event template id. - * - * @return array - * Array of custom data defaults. - */ - public function templateCustomDataValues($templateId) { - $defaults = array(); - if (!$templateId) { - return $defaults; - } - - // pull template custom data as a default for event, CRM-5596 - $groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_type, $this, $templateId, NULL, $this->_subType); - $groupTree = CRM_Core_BAO_CustomGroup::formatGroupTree($groupTree, $this->_groupCount, $this); - $customValues = array(); - CRM_Core_BAO_CustomGroup::setDefaults($groupTree, $customValues); - foreach ($customValues as $key => $val) { - if ($fieldKey = CRM_Core_BAO_CustomField::getKeyID($key)) { - $defaults["custom_{$fieldKey}_-1"] = $val; - } - } - - return $defaults; - } - }