public function indexAction(Request $request)
{
$source = new Entity("OjsJournalBundle:Subject");
$grid = $this->get('grid')->setSource($source);
$gridAction = $this->get('grid_action');
$actionColumn = new ActionsColumn("actions", 'actions');
$rowAction[] = $gridAction->showAction('ojs_admin_subject_show', 'id');
$rowAction[] = $gridAction->editAction('ojs_admin_subject_edit', 'id');
$rowAction[] = $gridAction->deleteAction('ojs_admin_subject_delete', 'id');
$actionColumn->setRowActions($rowAction);
$grid->addColumn($actionColumn);
/** @var ArrayCollection|Subject[] $all */
$all = $this->getDoctrine()->getRepository('OjsJournalBundle:Subject')->findAll();
$data = ['grid' => $grid, 'tree' => TreeHelper::createSubjectTreeView(TreeHelper::SUBJECT_ADMIN, $this->get('router'), $all)];
return $grid->getGridResponse('OjsAdminBundle:AdminSubject:index.html.twig', $data);
}