本文整理汇总了PHP中Twig_Node::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Twig_Node::__construct方法的具体用法?PHP Twig_Node::__construct怎么用?PHP Twig_Node::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Twig_Node
的用法示例。
在下文中一共展示了Twig_Node::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($manifest, $config, $files, $line, $tag = null)
{
parent::__construct(array(), array(), $line, $tag);
$this->manifest = $manifest;
$this->config = $config;
$this->files = $files;
}
示例2: __construct
public function __construct(Twig_Node_Expression $expr, $sandboxed, $variables, $lineno, $tag = null)
{
parent::__construct($lineno, $tag);
$this->expr = $expr;
$this->sandboxed = $sandboxed;
$this->variables = $variables;
}
示例3: __construct
public function __construct($count, Twig_NodeList $body, $plural, $lineno, $tag = null)
{
parent::__construct($lineno, $tag);
$this->count = $count;
$this->body = $body;
$this->plural = $plural;
}
示例4: __construct
public function __construct($name, $imitates, $settings, $lineNo)
{
parent::__construct(array(), array(), $lineNo);
$this->name = $name;
$this->imitates = $imitates;
$this->settings = $settings;
}
示例5: __construct
public function __construct(Context $context, $type, $resource, $lineno, $tag)
{
parent::__construct([], [], $lineno, $tag);
$this->type = $type;
$this->resource = $resource;
$this->context = $context;
}
示例6: __construct
public function __construct($name, $vars, $lineNo)
{
parent::__construct(array(), array(), $lineNo);
$this->name = $name;
$this->vars = $vars;
}
示例7: __construct
/**
* Constructor
*
* @param string $lineno
* @param string $method
* @param string $files
* @param string $options
* @author Jonathan Geiger
*/
public function __construct($lineno, $method, $files, $options = NULL)
{
parent::__construct($lineno);
$this->method = $method;
$this->files = $files;
$this->options = $options;
}
示例8: __construct
public function __construct($isMultitarget, $names, $values, $lineno, $tag = null)
{
parent::__construct($lineno, $tag);
$this->isMultitarget = $isMultitarget;
$this->names = $names;
$this->values = $values;
}
示例9: __construct
public function __construct(array $usedFilters, array $usedTags, array $usedFunctions)
{
$this->usedFilters = $usedFilters;
$this->usedTags = $usedTags;
$this->usedFunctions = $usedFunctions;
parent::__construct();
}
示例10: __construct
public function __construct($name, Twig_NodeList $body, $lineno, $parent = null, $tag = null)
{
parent::__construct($lineno, $tag);
$this->name = $name;
$this->body = $body;
$this->parent = $parent;
}
示例11: __construct
public function __construct(AssetInterface $asset, \Twig_NodeInterface $body, $attributes, $lineno = 0, $tag = null)
{
$nodes = array('body' => $body);
$attributes['asset'] = $asset;
$attributes['var_name'] = 'asset_url';
parent::__construct($nodes, $attributes, $lineno, $tag);
}
示例12: __construct
/**
* @param array $entityType
* @param \Twig_NodeInterface $ids
* @param string $viewMode
* @param null $langcode
* @param null $page
* @param int $lineno
* @param null $tag
*/
public function __construct($entityType, \Twig_NodeInterface $ids, $viewMode = 'full', $langcode = null, $page = null, $lineno = 0, $tag = null)
{
$nodes = array();
// Load the entities by type and an array of IDs.
// Assemble arguments for entity_load().
$argumentsNodes = array();
$argumentsNodes[] = $entityTypeNode = new \Twig_Node_Expression_Constant($entityType, $lineno);
$argumentsNodes[] = $ids;
// Construct call to entity_load() and capture the result in temporary
// variable named `entities`.
$valuesNode = new \Twig_Node(array(new \Twig_Node_Expression_Function('entity_load', new \Twig_Node($argumentsNodes), $lineno)));
$entitiesNamesNode = new \Twig_Node(array(new \Twig_Node_Expression_TempName('entities', $lineno)));
$nodes[] = new \Twig_Node_Set(false, $entitiesNamesNode, $valuesNode, $lineno);
// Assemble arguments for entity_view()
$argumentsNodes = array();
$argumentsNodes[] = $entityTypeNode;
$argumentsNodes[] = $entitiesNamesNode;
$argumentsNodes[] = new \Twig_Node_Expression_Constant($viewMode, $lineno);
$argumentsNodes[] = new \Twig_Node_Expression_Constant($langcode, $lineno);
$argumentsNodes[] = new \Twig_Node_Expression_Constant($page, $lineno);
// Construct call to entity_view() and capture the result in
// temporary variable named `output`.
$valuesNode = new \Twig_Node(array(new \Twig_Node_Expression_Function('entity_view', new \Twig_Node($argumentsNodes), $lineno)));
$outputNamesNode = new \Twig_Node(array(new \Twig_Node_Expression_TempName('output', $lineno)));
$nodes[] = new \Twig_Node_Set(false, $outputNamesNode, $valuesNode, $lineno);
// Assemble arguments for drupal_render().
$argumentsNodes = array();
$argumentsNodes[] = $outputNamesNode;
// Construct call to drupal_render() and echo the result.
$expr = new \Twig_Node_Expression_Function('drupal_render', new \Twig_Node($argumentsNodes), $lineno);
$nodes[] = new \Twig_Node_Print($expr, $lineno);
// Pass the original arguments up.
$attributes = array('entity_type' => $entityType, 'view_mode' => $viewMode, 'langcode' => $langcode, 'page' => $page);
parent::__construct($nodes, $attributes, $lineno, $tag);
}
示例13: __construct
public function __construct($isMultitarget, $names, Twig_Node_Expression $value, $lineno, $tag = null)
{
parent::__construct($lineno, $tag);
$this->isMultitarget = $isMultitarget;
$this->names = $names;
$this->value = $value;
}
示例14: __construct
/**
* @param integer $lineno
* @param string $tag
*/
public function __construct(\Twig_Node $variable, \Twig_Node $collectionType, \Twig_Node_Expression_Filter $collectionFilters = null, \Twig_Node_Expression $parameters = null, \Twig_Node_Expression $ifExpression = null, \Twig_NodeInterface $else = null, \Twig_NodeInterface $body, $lineno, $tag = null)
{
$body = new \Twig_Node(array($body, $this->loop = new \Twig_Node_ForLoop($lineno, $tag)));
if (null !== $ifExpression) {
$body = new \Twig_Node_If(new \Twig_Node(array($ifExpression, $body)), null, $lineno, $tag);
}
parent::__construct(array('variable' => $variable, 'collectionType' => $collectionType, 'collectionFilters' => $collectionFilters, 'parameters' => $parameters, 'ifExpression' => $ifExpression, 'else' => $else, 'body' => $body), array('with_loop' => true, 'ifexpr' => null !== $ifExpression), $lineno, $tag);
}
示例15: __construct
public function __construct($name, $method, \Twig_NodeList $arguments, $echo, $lineno, $tag = null)
{
parent::__construct($lineno, $tag);
$this->name = $name;
$this->method = $method;
$this->arguments = $arguments;
$this->echo = $echo;
}