public function TwigTransTokenParser::decideForFork

public TwigTransTokenParser::decideForFork($token)

Detect a 'plural' switch or the end of a 'trans' tag.

File

core/lib/Drupal/Core/Template/TwigTransTokenParser.php, line 58

Class

TwigTransTokenParser
A class that defines the Twig 'trans' token parser for Drupal.

Namespace

Drupal\Core\Template

Code

public function decideForFork($token) {
  return $token->test(array('plural', 'endtrans'));
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Template!TwigTransTokenParser.php/function/TwigTransTokenParser::decideForFork/8.1.x