PageRenderTime 46ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/fuel/packages/oil/views/scaffolding/orm/actions/view.php

https://bitbucket.org/codeyash/bootstrap
PHP | 10 lines | 8 code | 2 blank | 0 comment | 1 complexity | 52a3bc488de17c61748f409e8a4e172c MD5 | raw file
Possible License(s): MIT, Apache-2.0
  1. is_null($id) and Response::redirect('<?php echo $controller_name ?>');
  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 $controller_name ?>');
  6. }
  7. $this->template->title = "<?php echo ucfirst($singular_name) ?>";
  8. $this->template->content = View::forge('<?php echo $view_path ?>/view', $data);