Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Problem using view helper in other view helper #52

Closed
Orkin opened this Issue · 2 comments

3 participants

@Orkin

Hi, I use a view helper in an other view helper called priceFormat dans I have an error.

This is the code of my view helper priceFormat : https://gist.github.com/91d14749cb799c08392f => module "Application"

In a the view helper ShowMovementDetail (module "Movement") I'm doing this
$this->getView()->priceFormat($value)
This line throw an exception : : Call to undefined method ZfcTwig\View\Renderer\TwigRenderer::priceFormat().

Have you gote an idea ?

@danizord

Use this:

$helper = $this->getView()->plugin('priceFormat');
$helper($value);
@Orkin

Thanx for your solution but why it's not possible to use view helper like in view ?

@spiffyjr spiffyjr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.