X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fmetatag%2Fsrc%2FMetatagToken.php;h=e240fc01994145541b5b80372fb7dbb70a9d1b08;hp=a1190275a6f60abb44ef1921874432b7ad65722e;hb=059867c3f96750652c80f39e44c442a58c2549ee;hpb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2 diff --git a/web/modules/contrib/metatag/src/MetatagToken.php b/web/modules/contrib/metatag/src/MetatagToken.php index a1190275a..e240fc019 100644 --- a/web/modules/contrib/metatag/src/MetatagToken.php +++ b/web/modules/contrib/metatag/src/MetatagToken.php @@ -3,6 +3,7 @@ namespace Drupal\metatag; use Drupal\Core\Utility\Token; +use Drupal\Core\Render\BubbleableMetadata; /** * Token handling service. Uses core token service or contributed Token. @@ -35,17 +36,20 @@ class MetatagToken { * Arguments for token->replace(). * @param array $options * Any additional options necessary. + * @param \Drupal\Core\Render\BubbleableMetadata|null $bubbleable_metadata + * (optional) An object to which static::generate() and the hooks and + * functions that it invokes will add their required bubbleable metadata. * * @return mixed|string * The processed string. */ - public function replace($string, array $data = [], array $options = []) { + public function replace($string, array $data = [], array $options = [], BubbleableMetadata $bubbleable_metadata = NULL) { // Set default requirements for metatag unless options specify otherwise. $options = $options + [ 'clear' => TRUE, ]; - $replaced = $this->token->replace($string, $data, $options); + $replaced = $this->token->replace($string, $data, $options, $bubbleable_metadata); // Ensure that there are no double-slash sequences due to empty token // values.