waViewController

Processing of HTTP requests and returning of HTML string generated mainly by means of layout and action classes

Contents...

Parent class: waController.

See explanation of HTTP request routing in backend and in frontend.

The main difference of this controller to its parent class is in its capability to use page layouts, execute arbitrary actions for generating main page content, and return generated HTML content to user.

Main HTTP request processing logic must be described in public method execute().

Methods

public function executeAction (waViewAction $action, $name = 'content', waDecorator $decorator = null)

Executes method display() of specified action class for returning generated HTML string as response to user's request.

Parameters

Example

$this->executeAction(new myappBackendNewPageAction());

public function getLayout ()

Returns instance of waLayout class currently used for creating the general page layout.

Example

$current_layout = $this->getLayout();

public function setLayout (waLayout $layout=null)

Sets current layout (waLayout) for creating general page layout.

Parameters

Example

$this->setLayout(new myappBackendLayout());