Example #1
0
 /**
  * @return \Tabulate\Template
  */
 private function getTemplate(\Tabulate\DB\Table $table)
 {
     $template = new Template('record/edit.twig');
     $customTemplate = 'record/' . $table->getName() . '/edit.twig';
     if ($template->getLoader()->exists($customTemplate)) {
         $template->setTemplateName($customTemplate);
     }
     $template->table = $table;
     $template->controller = 'record';
     $template->title = $table->getTitle();
     $template->tables = $table->getDatabase()->getTables();
     return $template;
 }