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?
Each ViewHelper is a standalone class, if that method myMethod()
is declared within this class, make it static private static function myMethod(){...}
and call as self::myMethod();
.