Symfony Twig exception -
i trying use html table bundle:
https://github.com/ekyna/tablebundle
here calling code:
$table = $this->get('table.factory')->createbuilder( new inventorytype(), ['name' => 'project_inventory_list'] )->gettable($request); $content = ['content_area' => $table->createview()]; return $this->render('myprojectbundle:default:index.html.twig', $content); i getting exception:
an exception has been thrown during rendering of template ("catchable fatal error: object of class ekyna\component\table\tableview not converted string") in myprojectbundle:default:index.html.twig @ line 6.
stepped through code not sure whats going on - hoping it's trivial issue???
| edit
{% extends 'mythemebundle:layout:base-layout.html.twig' %} {% block title %}header{% endblock %} {% block page_content %} {{ content_area }} {% endblock %}
in twig template, have following:
{% extends 'mythemebundle:layout:base-layout.html.twig' %} {% block title %}header{% endblock %} {% block page_content %} {{ ekyna_table_render(content_area ) }} {% endblock %} you need use twig function ekyna_table_render render table view.
Comments
Post a Comment