protected function initTwig( \Aimeos\MW\View\Iface $view, \Twig_Environment $twig )
	{
		$fcn = function( $key, $default = null ) use ( $view ) {
			return $view->config( $key, $default );
		};
		$twig->addFunction( new \Twig_SimpleFunction( 'aiconfig', $fcn ) );

		$fcn = function( $singular, array $values = array(), $domain = 'client' ) use ( $view ) {
			return vsprintf( $view->translate( $domain, $singular ), $values );
		};
		$twig->addFunction( new \Twig_SimpleFunction( 'aitrans', $fcn ) );

		$fcn = function( $singular, $plural, $number, array $values = array(), $domain = 'client' ) use ( $view ) {
			return vsprintf( $view->translate( $domain, $singular, $plural, $number ), $values );
		};
		$twig->addFunction( new \Twig_SimpleFunction( 'aitransplural', $fcn ) );
	}
protected function initTwig( \Aimeos\MW\View\Iface $view, \Twig_Environment $twig )
	{
		$fcn = function( $key, $default = null ) use ( $view ) {
			return $view->config( $key, $default );
		};
		$twig->addFunction( new \Twig_SimpleFunction( 'aiconfig', $fcn ) );

		$fcn = function( $singular, array $values = array(), $domain = 'client' ) use ( $view ) {
			return vsprintf( $view->translate( $domain, $singular ), $values );
		};
		$twig->addFunction( new \Twig_SimpleFunction( 'aitrans', $fcn ) );

		$fcn = function( $singular, $plural, $number, array $values = array(), $domain = 'client' ) use ( $view ) {
			return vsprintf( $view->translate( $domain, $singular, $plural, $number ), $values );
		};
		$twig->addFunction( new \Twig_SimpleFunction( 'aitransplural', $fcn ) );
	}
protected function initTwig ( \ Aimeos \ MW \ View \ Iface $ view , \ Twig_Environment $ twig ) { $ fcn = function ( $ key , $ default = null ) use ( $ view ) { return $ view -> config ( $ key , $ default ) ; } ; $ twig -> addFunction ( new \ Twig_SimpleFunction ( 'aiconfig' , $ fcn ) ) ; $ fcn = function ( $ singular , array $ values = array ( ) , $ domain = 'client' ) use ( $ view ) { return vsprintf ( $ view -> translate ( $ domain , $ singular ) , $ values ) ; } ; $ twig -> addFunction ( new \ Twig_SimpleFunction ( 'aitrans' , $ fcn ) ) ; $ fcn = function ( $ singular , $ plural , $ number , array $ values = array ( ) , $ domain = 'client' ) use ( $ view ) { return vsprintf ( $ view -> translate ( $ domain , $ singular , $ plural , $ number ) , $ values ) ; } ; $ twig -> addFunction ( new \ Twig_SimpleFunction ( 'aitransplural' , $ fcn ) ) ; }
Adds the Aimeos template functions for Twig

@param \Aimeos\MW\View\Iface $view View object
@param \Twig_Environment $twig Twig environment object
Adds the Aimeos template functions for Twig