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

Breadcrumb

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

function DateTimeComputed::setValue

Overrides TypedData::setValue

File

core/modules/datetime/src/DateTimeComputed.php, line 81

Class

DateTimeComputed
A computed property for dates of date time field items.

Namespace

Drupal\datetime

Code

public function setValue($value, $notify = TRUE) {
    $this->date = $value;
    // Notify the parent of any changes.
    if ($notify && isset($this->parent)) {
        $this->parent
            ->onChange($this->name);
    }
}

API Navigation

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