How can I call a (own written ) method inside a viewhelper?
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) {
$this->myMethod();
I guess it won't work this way?
How can I call a (own written ) method inside a viewhelper?
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) {
$this->myMethod();
I guess it won't work this way?
Copyright © 2021 Jogjafile Inc.
Each ViewHelper is a standalone class, if that method
myMethod()is declared within this class, make it staticprivate static function myMethod(){...}and call asself::myMethod();.