PageRenderTime 51ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/views/scaffolding/orm/actions/view.php

http://github.com/fuel/oil
PHP | 10 lines | 8 code | 2 blank | 0 comment | 1 complexity | 5db227f01f5d8e420dc3487e85e0ac17 MD5 | raw file
  1. is_null($id) and Response::redirect('<?php echo $uri ?>');
  2. if ( ! $data['<?php echo $singular_name ?>'] = Model_<?php echo $model_name ?>::find($id))
  3. {
  4. Session::set_flash('error', 'Could not find <?php echo $singular_name; ?> #'.$id);
  5. Response::redirect('<?php echo $uri ?>');
  6. }
  7. $this->template->title = "<?php echo ucfirst($singular_name) ?>";
  8. $this->template->content = View::forge('<?php echo $view_path; ?>/view', $data);