Issue #2418179 by martin107: twig.engine needs some documentation fixes
							parent
							
								
									685470f2df
								
							
						
					
					
						commit
						e5d8a95a1b
					
				| 
						 | 
				
			
			@ -40,15 +40,15 @@ function twig_init(Extension $theme) {
 | 
			
		|||
 * If the Twig debug setting is enabled, HTML comments including _theme() call
 | 
			
		||||
 * and template file name suggestions will surround the template markup.
 | 
			
		||||
 *
 | 
			
		||||
 * @param $template_file
 | 
			
		||||
 * @param string $template_file
 | 
			
		||||
 *   The file name of the template to render.
 | 
			
		||||
 * @param $variables
 | 
			
		||||
 * @param array $variables
 | 
			
		||||
 *   A keyed array of variables that will appear in the output.
 | 
			
		||||
 *
 | 
			
		||||
 * @return string
 | 
			
		||||
 *   The output generated by the template, plus any debug information.
 | 
			
		||||
 */
 | 
			
		||||
function twig_render_template($template_file, $variables) {
 | 
			
		||||
function twig_render_template($template_file, array $variables) {
 | 
			
		||||
  /** @var \Twig_Environment $twig_service */
 | 
			
		||||
  $twig_service = \Drupal::service('twig');
 | 
			
		||||
  try {
 | 
			
		||||
| 
						 | 
				
			
			@ -118,9 +118,9 @@ function twig_render_template($template_file, $variables) {
 | 
			
		|||
 * returned directly.
 | 
			
		||||
 *
 | 
			
		||||
 * @param mixed $arg
 | 
			
		||||
 *   String, Object or Render Array
 | 
			
		||||
 *   String, Object or Render Array.
 | 
			
		||||
 *
 | 
			
		||||
 * @return
 | 
			
		||||
 * @return mixed
 | 
			
		||||
 *   The rendered output or an Twig_Markup object.
 | 
			
		||||
 *
 | 
			
		||||
 * @see render
 | 
			
		||||
| 
						 | 
				
			
			@ -167,7 +167,7 @@ function twig_render_var($arg) {
 | 
			
		|||
 * elements. The original renderable array is still available and can be used
 | 
			
		||||
 * to print child elements in their entirety in the twig template.
 | 
			
		||||
 *
 | 
			
		||||
 * @param array $element
 | 
			
		||||
 * @param array|object $element
 | 
			
		||||
 *   The parent renderable array to exclude the child items.
 | 
			
		||||
 * @param string[] $args, ...
 | 
			
		||||
 *   The string keys of $element to prevent printing.
 | 
			
		||||
| 
						 | 
				
			
			@ -197,14 +197,14 @@ function twig_without($element) {
 | 
			
		|||
 *
 | 
			
		||||
 * Replacement function for Twig's escape filter.
 | 
			
		||||
 *
 | 
			
		||||
 * @param Twig_Environment $env
 | 
			
		||||
 * @param \Twig_Environment $env
 | 
			
		||||
 *   A Twig_Environment instance.
 | 
			
		||||
 * @param string $string
 | 
			
		||||
 *   The value to be escaped.
 | 
			
		||||
 * @param string $strategy
 | 
			
		||||
 *   The escaping strategy. Defaults to 'html'.
 | 
			
		||||
 * @param string $charset
 | 
			
		||||
 *  The charset.
 | 
			
		||||
 *   The charset.
 | 
			
		||||
 * @param bool $autoescape
 | 
			
		||||
 *   Whether the function is called by the auto-escaping feature (TRUE) or by
 | 
			
		||||
 *   the developer (FALSE).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue