Loading office_hours.api.php +2 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ */ use Drupal\Core\Entity\EntityInterface; use Drupal\user\EntityOwnerInterface; /** * @addtogroup hooks Loading Loading @@ -39,7 +40,7 @@ function hook_office_hours_current_time_alter(int &$time, EntityInterface $entit // Each city has a timezone attached. // // Adjust content time to content owner's timezone. if ($entity instanceof \Drupal\user\EntityOwnerInterface if ($entity instanceof EntityOwnerInterface && ($account = $entity->getOwner()) && ($account->isAuthenticated()) ) { Loading Loading
office_hours.api.php +2 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ */ use Drupal\Core\Entity\EntityInterface; use Drupal\user\EntityOwnerInterface; /** * @addtogroup hooks Loading Loading @@ -39,7 +40,7 @@ function hook_office_hours_current_time_alter(int &$time, EntityInterface $entit // Each city has a timezone attached. // // Adjust content time to content owner's timezone. if ($entity instanceof \Drupal\user\EntityOwnerInterface if ($entity instanceof EntityOwnerInterface && ($account = $entity->getOwner()) && ($account->isAuthenticated()) ) { Loading