• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/model/schedule/schedule.php
  • Класс: BitrixTimemanModelScheduleSchedule
  • Вызов: Schedule::isDeviceAllowed
static function isDeviceAllowed($device, $schedule)
{
	if (!$schedule)
	{
		return true;
	}
	$allowedDevices = $schedule['ALLOWED_DEVICES'];
	if (!$device)
	{
		return true;
	}
	if (empty($allowedDevices))
	{
		return false;
	}
	if (!in_array($device, array_keys($allowedDevices), true))
	{
		return false;
	}
	return $allowedDevices[$device] === true;
}