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;
- }
-
}