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

Breadcrumb

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

function TemplateElement::setRawValue

Sets node's raw value that must be wrapped in templates quotes.

Parameters

string $rawValue Raw value:

Return value

$this

File

vendor/mck89/peast/lib/Peast/Syntax/Node/TemplateElement.php, line 120

Class

TemplateElement
A node that represents a template element. For example `foo` and `bar` in: `foo${exp}bar`

Namespace

Peast\Syntax\Node

Code

public function setRawValue($rawValue) {
    $rawValue = preg_replace("#^[`}]|(?:`|\\\$\\{)\$#", "", $rawValue);
    $this->setValue(Utils::unquoteLiteralString("`{$rawValue}`"));
    $this->rawValue = $rawValue;
    return $this;
}

API Navigation

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