Implement the 'get_time_period' function

refs #8467
This commit is contained in:
Gunnar Beutner 2015-02-23 13:56:53 +01:00
parent 1e4c5cf2f2
commit 47479ac4de
2 changed files with 10 additions and 0 deletions

View File

@ -99,6 +99,15 @@ Signature:
Returns the UserGroup object with the specified name, or `null` if no such UserGroup object exists.
### <a id="objref-get_time_period"></a> get_time_period
Signature:
function get_time_period(name);
Returns the TimePeriod object with the specified name, or `null` if no such TimePeriod object exists.
### <a id="objref-get_object"></a> get_object
Signature:

View File

@ -38,6 +38,7 @@ REGISTER_SCRIPTFUNCTION(get_notification_command, &NotificationCommand::GetByNam
REGISTER_SCRIPTFUNCTION(get_host_group, &HostGroup::GetByName);
REGISTER_SCRIPTFUNCTION(get_service_group, &ServiceGroup::GetByName);
REGISTER_SCRIPTFUNCTION(get_user_group, &UserGroup::GetByName);
REGISTER_SCRIPTFUNCTION(get_time_period, &TimePeriod::GetByName);
Service::Ptr ObjectUtils::GetService(const String& host, const String& name)
{