예제 #1
0
파일: Show.php 프로젝트: exildev/q-stad
 public static function as_table(array $models, $edit = null, $delete = null)
 {
     $html = file_get_contents(realpath(dirname(__FILE__)) . "/html/table.html");
     $show = new Show($models[0]);
     $head = $show->as_headrow($edit, $delete);
     $body = "";
     foreach ($models as $model) {
         $show->model = $model;
         $body .= $show->as_row($edit, $delete);
     }
     $html = str_replace(array('{{HEAD}}', '{{BODY}}'), array($head, $body), $html);
     return $html;
 }