PIM-1473 : Move state method from category helper to twig extension