Lines Matching refs:context

90     public function getParent(array $context)
97 $parent = $this->doGetParent($context);
120 protected function doGetParent(array $context)
137 * @param array $context The context
140 public function displayParentBlock($name, array $context, array $blocks = [])
143 $this->traits[$name][0]->displayBlock($name, $context, $blocks, false);
144 } elseif (false !== $parent = $this->getParent($context)) {
145 $parent->displayBlock($name, $context, $blocks, false);
158 * @param array $context The context
162 public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true, self $templateContext = null)
182 $template->$block($context, $blocks);
201 } elseif (false !== $parent = $this->getParent($context)) {
202 $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
217 * @param array $context The context
222 public function renderParentBlock($name, array $context, array $blocks = [])
229 $this->displayParentBlock($name, $context, $blocks);
241 * @param array $context The context
247 public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true)
254 $this->displayBlock($name, $context, $blocks, $useBlocks);
260 * Returns whether a block exists or not in the current context of the template.
266 * @param array $context The context
271 public function hasBlock($name, array $context, array $blocks = [])
281 if (false !== $parent = $this->getParent($context)) {
282 return $parent->hasBlock($name, $context);
289 * Returns all block names in the current context of the template.
294 * @param array $context The context
299 public function getBlockNames(array $context, array $blocks = [])
303 if (false !== $parent = $this->getParent($context)) {
304 $names = array_merge($names, $parent->getBlockNames($context));
376 public function display(array $context, array $blocks = [])
378 $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
381 public function render(array $context)
390 $this->display($context);
402 protected function displayWithErrorHandling(array $context, array $blocks = [])
405 $this->doDisplay($context, $blocks);
427 * Auto-generated method to display the template with the given context.
429 * @param array $context An array of parameters to pass to the template
432 abstract protected function doDisplay(array $context, array $blocks = []);