Created
August 15, 2018 19:41
-
-
Save longtailventures/5ec374f9f0fcdeb5b053c0d0217446ed to your computer and use it in GitHub Desktop.
Slim page tracking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in router file: | |
$slimApplication->get( | |
'/demo/control', | |
'controllers.ad:demoAction' | |
) | |
->setArgument('mode', 'control') | |
->setArgument('demoIndex', null) | |
->setName('controllers.ad:demoAction'); | |
in action function: | |
$this->_app['app.currentControllerAction'] = $request->getAttribute('route')->getName(); | |
in layout file: | |
<!-- TEST: <?= $_app['app.currentControllerAction'] ?> --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment