My code of Helper Class is as below :
public function getPlaceholders()
{
try {
echo $this->getParameter('kernel.root_dir');
} catch (ParseException $e) {
printf("Unable to parse the YAML string: %s", $e->getMessage());
}
return $this->placeholders;
}
It's returning the error as below :
Attempted to call an undefined method named "getParameter" of class "AppBundle\Helper\Placeholders".
Please advice me on it.