2017 © Pedro Peláez
 

library chillrender

Utility to render views quick and easy

image

brunnofoggia/chillrender

Utility to render views quick and easy

  • Monday, January 23, 2017
  • by brunnofoggia
  • Repository
  • 0 Watchers
  • 0 Stars
  • 31 Installations
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

ChillRender

Minimum PHP Version License, (*1)

Utility to render views quick and easy, (*2)

usage

  1. Implement it into your class, (*3)

    class Test {
        use \ChillRender;
    }
  2. Set your paths, (*4)

    protected $attrDefaults = [
        'layout' => 'views/layout', // file extension is .php by default, but you can send yours
        'viewPath' => 'views/'
    ];
  3. Rendering, (*5)

    // Just rendering
    $this->render('index');
    // Sending data to view
    $this->render('views/index', ['mydata' => $data]);
    // Rendering with other layout
    $this->render('views/index', [], 'views/other_layout');
    // Rendering without layout
    $this->render('views/index', [], false);
    // Rendering layout with custom content
    $this->renderLayout(['content' => $custom]);
    // Rendering a partial view
    $this->renderPartial('views/sidebar', ['mydata' => $data]);
  • Layout will not be rendered for ajax requests

The Versions

23/01 2017

dev-master

9999999-dev

Utility to render views quick and easy

  Sources   Download

MIT

The Requires

 

23/01 2017

1.0.0

1.0.0.0

Utility to render views quick and easy

  Sources   Download

MIT

The Requires