Ejemplo n.º 1
0
 public function render()
 {
     $paragraph = new \Frame\Views\Paragraph();
     $paragraph->text('Incorrect username/password combination');
     $login = new \Work\Views\Login($this->data);
     $layout = new \Frame\Views\Layout(array(array($paragraph), array($login)));
     return $layout->render();
 }
Ejemplo n.º 2
0
 public function render()
 {
     $paragraph = new \Frame\Views\Paragraph();
     $paragraph->text('Hello Frameworld!');
     $form = new \Frame\Views\Form('\\Work\\Controllers\\Main::welcome', 'welcome');
     $form->input('Name:', 'text', '', 'name');
     $form->input('Age:', 'text', '', 'age');
     $form->input('', 'submit', 'Submit', 'submit');
     $layout = new \Frame\Views\Layout(array(array($paragraph, 'welcome' => $form)));
     return $layout->render();
 }
Ejemplo n.º 3
0
 public static function controllers()
 {
     $panels = array();
     $controllers = \Work\Models\Controller::get();
     foreach ($controllers as $controller) {
         $form = new \Frame\Views\Form('\\Work\\Controllers\\Testing::inputs', 'input');
         $form->input('', 'hidden', $controller->controller, 'inputs_submit');
         $form->input($controller->controller, 'submit', 'Test');
         $panels[] = array($form);
     }
     $layout = new \Frame\Views\Layout($panels);
     $input = new \Frame\Views\Paragraph();
     $input->text('Input');
     $output = new \Frame\Views\Paragraph();
     $output->text('Output');
     $outer_layout = new \Frame\Views\Layout(array(array($layout, 'input' => $input, 'output' => $output)));
     return $outer_layout->render();
 }
Ejemplo n.º 4
0
 public static function welcome($data)
 {
     $p = new \Frame\Views\Paragraph();
     $p->text("Welcome {$data['name']}, {$data['age']}");
     return $p->render();
 }
Ejemplo n.º 5
0
 public function render()
 {
     $paragraph = new \Frame\Views\Paragraph();
     $paragraph->text('Footer');
     return $paragraph->render();
 }
Ejemplo n.º 6
0
 public function render()
 {
     $paragraph = new \Frame\Views\Paragraph();
     $paragraph->text('You do not have permission to be here');
     return $paragraph->render();
 }