public function NodeRegistrationNodeSettings::max_registration_time in Node registration 7
Retrieves the maximum registration time for this event.
2 calls to NodeRegistrationNodeSettings::max_registration_time()
- NodeRegistrationNodeSettings::get_end_date in includes/
node_registration.node_settings.inc - Returns the event's end date + time.
- NodeRegistrationNodeSettings::max_registration_time_passed in includes/
node_registration.node_settings.inc - Whether the maximum registration time has passed.
File
- includes/
node_registration.node_settings.inc, line 206 - Node settings class.
Class
- NodeRegistrationNodeSettings
- Node settings class.
Code
public function max_registration_time(&$origin = NULL) {
// Get setting from node field values.
$date_field = $this->max_registration_date_field;
if ($time = $this
->time_from_date_field($date_field)) {
$origin = 'node field value (' . $date_field . ')';
return $time;
}
// Get setting from node or registration type settings.
if ($this->allow_registration_until) {
if ($event_start = $this
->site_utc()) {
$max_time = _node_registration_strtotime($event_start, $this->allow_registration_until);
$origin = 'event date (' . $event_start . ') - allow until (' . $this->allow_registration_until . ')';
return $max_time;
}
}
// This event has no maximum registration time.
$origin = '';
}