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

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

https://bitbucket.org/trujka/codegrounds
PHP | 10 lines | 8 code | 2 blank | 0 comment | 1 complexity | af45d438aa8e8fefb6cc0ce0a760bf0e MD5 | raw file
Possible License(s): MIT, BSD-3-Clause, LGPL-2.1
  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);