~titan-phpdevshell/phpdevshell/main

« back to all changes in this revision

Viewing changes to plugins/ExamplePlugin/controllers/example/orm-example.php.php

  • Committer: Jason Schoeman
  • Date: 2011-12-06 14:03:32 UTC
  • Revision ID: titan@phpdevshell.org-20111206140332-4ej6qy4b36d3q96s
Crud Added
ORM Added
Control Panel optimized

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
// In example 2, we load the view without using the Smarty plugin, just a view in good old PHP.
 
3
 
 
4
class exampleTwo extends PHPDS_controller
 
5
{
 
6
        /**
 
7
         * We always start by overriding the execute method for the controller.
 
8
         * @author Jason Schoeman
 
9
         */
 
10
        public function execute()
 
11
        {
 
12
                // Lets do it without Smarty.
 
13
                $title = "Some Title";
 
14
                $some_text = "This is some text to show that you can have a view in PHP.";
 
15
 
 
16
                // Load view.
 
17
                // View will be looking for in plugins/ExamplePlugin/views/example/example-two.tpl.php notice its related to controller.
 
18
                include_once $this->template->getTpl();
 
19
        }
 
20
}
 
21
 
 
22
return 'exampleTwo';
 
23