GeneratedLink.php in Drupal 9
File
core/lib/Drupal/Core/GeneratedLink.php
View source
<?php
namespace Drupal\Core;
use Drupal\Component\Render\MarkupInterface;
use Drupal\Core\Render\BubbleableMetadata;
class GeneratedLink extends BubbleableMetadata implements MarkupInterface, \Countable {
const TAG = 'a';
protected $generatedLink = '';
public function getGeneratedLink() {
return $this->generatedLink;
}
public function setGeneratedLink($generated_link) {
$this->generatedLink = $generated_link;
return $this;
}
public function __toString() {
return (string) $this->generatedLink;
}
public function jsonSerialize() {
return $this
->__toString();
}
public function count() {
return mb_strlen($this
->__toString());
}
}
Classes
Name |
Description |
GeneratedLink |
Used to return generated links, along with associated cacheability metadata. |