You are here

public function PlaceholderResolverInterface::scan in Typed Data API enhancements 8

Builds a list of all placeholder tokens that appear in the text.

Parameters

string $text: The text to be scanned for possible tokens.

Return value

array An associative array of discovered placeholder tokens, grouped by data name. For each data name, the value is another associative array containing the completed, discovered placeholder and the main placeholder part as key; i.e. the placeholder without brackets and data name. For example, for the placeholder {{ data.property.property|filter }} the main placeholder part is 'property.property|filter'.

1 method overrides PlaceholderResolverInterface::scan()
PlaceholderResolver::scan in src/PlaceholderResolver.php
Builds a list of all placeholder tokens that appear in the text.

File

src/PlaceholderResolverInterface.php, line 106

Class

PlaceholderResolverInterface
Interface for a placeholder resolver based upon typed data.

Namespace

Drupal\typed_data

Code

public function scan($text);