SwInclude example

/** @var ArrayExpression $variables */
            $variables = $this->parser->getExpressionParser()->parseExpression();
        }

        $stream->next();

        $variables->addElement(
            new ConstantExpression($className$token->getLine()),
            new ConstantExpression('name', $token->getLine())
        );

        return new SwInclude($expr$variables, false, false, $token->getLine()$this->getTag());
    }

    public function getTag(): string
    {
        return 'sw_thumbnails';
    }
}
/** @var ArrayExpression $variables */
            $variables = $this->parser->getExpressionParser()->parseExpression();
        }

        $stream->next();

        $variables->addElement(
            new ConstantExpression($icon$token->getLine()),
            new ConstantExpression('name', $token->getLine())
        );

        return new SwInclude($expr$variables, false, false, $token->getLine()$this->getTag());
    }

    public function getTag(): string
    {
        return 'sw_icon';
    }
}
// resolves parent template         if ($expr->hasAttribute('value')) {
            // set pointer to next value (contains the template file name)             $parent = $this->finder->find($expr->getAttribute('value')$ignoreMissing);

            $expr->setAttribute('value', $parent);

            return new IncludeNode($expr$variables$only$ignoreMissing$token->getLine()$this->getTag());
        }

        return new SwInclude($expr$variables$only$ignoreMissing$token->getLine()$this->getTag());
    }

    public function getTag(): string
    {
        return 'sw_include';
    }

    private function parseArguments(): array
    {
        $stream = $this->parser->getStream();

        
Home | Imprint | This part of the site doesn't use cookies.