Augmentation vers version 3.3.0

This commit is contained in:
Gauvain Boiché
2020-03-31 15:31:03 +02:00
parent d926806907
commit a1864c0414
2618 changed files with 406015 additions and 31377 deletions

View File

@@ -35,12 +35,17 @@ class FormThemeTokenParser extends AbstractTokenParser
$stream = $this->parser->getStream();
$form = $this->parser->getExpressionParser()->parseExpression();
$only = false;
if ($this->parser->getStream()->test(Token::NAME_TYPE, 'with')) {
$this->parser->getStream()->next();
$resources = $this->parser->getExpressionParser()->parseExpression();
if ($this->parser->getStream()->nextIf(Token::NAME_TYPE, 'only')) {
$only = true;
}
} else {
$resources = new ArrayExpression(array(), $stream->getCurrent()->getLine());
$resources = new ArrayExpression([], $stream->getCurrent()->getLine());
do {
$resources->addElement($this->parser->getExpressionParser()->parseExpression());
} while (!$stream->test(Token::BLOCK_END_TYPE));
@@ -48,7 +53,7 @@ class FormThemeTokenParser extends AbstractTokenParser
$stream->expect(Token::BLOCK_END_TYPE);
return new FormThemeNode($form, $resources, $lineno, $this->getTag());
return new FormThemeNode($form, $resources, $lineno, $this->getTag(), $only);
}
/**