[feature/twig] context_recursive_loop_builder isn't used anymore, removing it

PHPBB3-11598
This commit is contained in:
Nathan Guse 2013-07-05 13:15:10 -05:00
parent c5c34ff831
commit 0ffbdc80d1

View file

@ -137,26 +137,4 @@ class phpbb_template_twig_environment extends Twig_Environment
return parent::loadTemplate($name, $index); return parent::loadTemplate($name, $index);
} }
} }
/**
* Recursive helper to set variables into $context so that Twig can properly fetch them for display
*
* @param array $data Data to set at the end of the chain
* @param array $blocks Array of blocks to loop into still
* @param mixed $current_location Current location in $context (recursive!)
* @return null
*/
public function context_recursive_loop_builder($data, $blocks, &$current_location)
{
$block = array_shift($blocks);
if (empty($blocks))
{
$current_location[$block] = $data;
}
else
{
$this->context_recursive_loop_builder($data, $blocks, $current_location[$block]);
}
}
} }