Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Time.php

function Time::__construct

Same name in this branch
  1. 11.1.x vendor/ramsey/uuid/src/Type/Time.php \Ramsey\Uuid\Type\Time::__construct()
  2. 11.1.x core/lib/Drupal/Component/Datetime/Time.php \Drupal\Component\Datetime\Time::__construct()
  3. 11.1.x core/modules/views/src/Plugin/views/cache/Time.php \Drupal\views\Plugin\views\cache\Time::__construct()

Parameters

array<string,mixed>|null $options:

string[]|null $groups:

bool|null $withSeconds Whether to allow seconds in the given value (defaults to true):

Overrides Constraint::__construct

File

vendor/symfony/validator/Constraints/Time.php, line 40

Class

Time
Validates that a value is a valid time that follows the H:i:s format.

Namespace

Symfony\Component\Validator\Constraints

Code

public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, mixed $payload = null, ?bool $withSeconds = null) {
    parent::__construct($options, $groups, $payload);
    $this->withSeconds = $withSeconds ?? $this->withSeconds;
    $this->message = $message ?? $this->message;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal