/** * This handles connecting a datetime to the event object that's been generated. * * @since 4.3.0 * * @param EE_Datetime $dtt * @param array $args incoming arguments from caller for specifying overrides. * * @return EE_Datetime */ private function _maybe_chained(EE_Datetime $dtt, $args) { if ($this->_chained) { if (empty($this->_event)) { $EVT_ID = isset($this->_special_args['EVT_ID']) ? $this->_special_args['EVT_ID'] : 0; $this->_set_new_event($EVT_ID); } //add relation to event $dtt->_add_relation_to($this->_event, 'Event'); $dtt->save(); return $dtt; } return $dtt; }