setTheme Method

This method will be loaded theme and overrides the current theme value using the new one.

The $theme_name value will be reffered to a directory name under app/view/.

Theme Requirements

The valid themes should contain these files with this directory structure.

|--- theme.json
|--- script.json
|--- page
|----- col-1.php
            

Basic Usage:

Here is the basic usage of Controller::setTheme.

Controller::setTheme(string $theme_name): ControllerObject
            

Example

Here is the example for setTheme method:

class Home extends SENE_Controller
{
  public function __construct()
  {
    parent::__construct();
    $this->setTheme('homepage');
  }
  public function index()
  {
    ...
  }
}
            

So, the directory homepage should be existed on the directory structure.

- app
|-- view
|--- front
|--- homepage