Reputation: 77
am using following parameters.yml
parameters:
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: en
secret: ThisTokenIsNotSoSecretChangeIt
name: krishnakumar
but when an trying to access the parameter like the below
<?php echo $view->container->parameters['name']; ?>
this throwing an error
Error: Cannot access private property appProdDebugProjectContainer::$parameters
Upvotes: 1
Views: 313
Reputation: 10890
Try this one:
<?php echo $view->container->getParameter('name'); ?>
Upvotes: 2