function ComputedFileUrl::setValue

Same name in other branches
  1. 8.9.x core/modules/file/src/ComputedFileUrl.php \Drupal\file\ComputedFileUrl::setValue()
  2. 10 core/modules/file/src/ComputedFileUrl.php \Drupal\file\ComputedFileUrl::setValue()
  3. 11.x core/modules/file/src/ComputedFileUrl.php \Drupal\file\ComputedFileUrl::setValue()

Overrides TypedData::setValue

File

core/modules/file/src/ComputedFileUrl.php, line 40

Class

ComputedFileUrl
Computed file URL property class.

Namespace

Drupal\file

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.