private function compileMaxPerPage(\Twig_Compiler $compiler) { $compiler->write("public function getMaxesPerPage()\n", "{\n")->indent(); $compiler->write("return array(\n"); $compiler->indent(); foreach ($this->getAttribute('maxesPerPage') as $maxPerPage) { $compiler->write($maxPerPage . ",\n"); } $compiler->outdent(); $compiler->write(");\n"); $compiler->outdent()->write("}\n\n"); }