GeneratedUrl.php 848 Bytes
Newer Older
1 2 3 4
<?php

namespace Drupal\Core;

5
use Drupal\Core\Render\BubbleableMetadata;
6 7

/**
8
 * Used to return generated URLs, along with associated bubbleable metadata.
9 10 11 12
 *
 * Note: not to be confused with \Drupal\Core\Url, which is for passing around
 *   ungenerated URLs (typically route name + route parameters).
 */
13
class GeneratedUrl extends BubbleableMetadata {
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

  /**
   * The string value of the URL.
   *
   * @var string
   */
  protected $generatedUrl = '';

  /**
   * Gets the generated URL.
   *
   * @return string
   */
  public function getGeneratedUrl() {
    return $this->generatedUrl ;
  }

  /**
   * Sets the generated URL.
   *
   * @param string $generated_url
   *   The generated URL.
   *
   * @return $this
   */
  public function setGeneratedUrl($generated_url) {
    $this->generatedUrl = $generated_url;
    return $this;
  }

}