Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
Selami view factory updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorkmaz committed Jul 24, 2018
1 parent 9ad157c commit a04fc6e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/SelamiViewTwigFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
$request = $container->get(ServerRequestInterface::class);
$viewConfig = $config['view'];
$viewConfig['templates_path'] = $config['app']['templates_path'];
$viewConfig['runtime']['query_parameters'] = self::getParams($request);
$viewConfig['runtime']['base_url'] = $config['app']['base_url'];
$viewConfig['runtime']['config'] = $config;
$viewConfig['runtime']['QueryParameters'] = self::getParams($request);
$viewConfig['runtime']['BaseUrl'] = $config['app']['base_url'];
$viewConfig['runtime']['RuntimeConfig'] = $config;
$viewConfig['runtime']['Request'] = $request;

$twig = $container->get(Twig_Environment::class);
return new SelamiTwig($twig, $viewConfig);
}
Expand Down

0 comments on commit a04fc6e

Please sign in to comment.