public static function Drupal::time in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal.php \Drupal::time()
Returns the time service.
Return value
\Drupal\Component\Datetime\TimeInterface The time service.
File
- core/
lib/ Drupal.php, line 775 - Contains \Drupal.
Class
- Drupal
- Static Service Container wrapper.
Code
public static function time() {
return static::getContainer()
->get('datetime.time');
}