Same name and namespace in other branches
- 8.9.x core/lib/Drupal.php \Drupal::time()
- 9 core/lib/Drupal.php \Drupal::time()
Returns the time service.
Return value
\Drupal\Component\Datetime\TimeInterface The time service.
141 calls to Drupal::time()
- announcements_feed_cron in core/
modules/ announcements_feed/ announcements_feed.module - Implements hook_cron().
- AssertViewsCacheTagsTrait::assertViewsCacheTags in core/
modules/ views/ src/ Tests/ AssertViewsCacheTagsTrait.php - Asserts a view's result & render cache items' cache tags.
- AssertViewsCacheTagsTrait::assertViewsCacheTagsFromStaticRenderArray in core/
modules/ views/ src/ Tests/ AssertViewsCacheTagsTrait.php - Asserts a view's result & render cache items' cache tags.
- BatchBidSerialUpdateTest::testUpdate in core/
modules/ system/ tests/ src/ Functional/ Update/ BatchBidSerialUpdateTest.php - Tests the change of the {batch} table [bid] field to serial.
- batch_process in core/
includes/ form.inc - Processes the batch.
File
- core/
lib/ Drupal.php, line 734
Class
- Drupal
- Static Service Container wrapper.
Code
public static function time() {
return static::getContainer()
->get('datetime.time');
}