You are here

public function ActiveHoursInterface::inHours in SMS Framework 8

Same name and namespace in other branches
  1. 2.x modules/sms_user/src/ActiveHoursInterface.php \Drupal\sms_user\ActiveHoursInterface::inHours()
  2. 2.1.x modules/sms_user/src/ActiveHoursInterface.php \Drupal\sms_user\ActiveHoursInterface::inHours()

Determine if the current time of a user is within permitted hour ranges.

Parameters

\Drupal\user\UserInterface $user: A user entity.

string $now: The local time for the user. Defaults to current time.

Return value

bool Whether the current time for a user is within active hours.

1 method overrides ActiveHoursInterface::inHours()
ActiveHours::inHours in modules/sms_user/src/ActiveHours.php
Determine if the current time of a user is within permitted hour ranges.

File

modules/sms_user/src/ActiveHoursInterface.php, line 24

Class

ActiveHoursInterface
Defines interface for the user active hours service.

Namespace

Drupal\sms_user

Code

public function inHours(UserInterface $user, $now = 'now');