Overview

Namespaces

  • Nethgui
    • Adapter
    • Authorization
    • Component
    • Controller
      • Collection
      • Table
    • Exception
    • Log
    • Model
    • Module
      • Help
      • Notification
    • Renderer
    • Serializer
    • System
    • Test
      • Tool
      • Unit
        • Nethgui
          • Adapter
            • ParameterSet
          • Authorization
          • Log
          • Module
            • Notification
          • Renderer
          • Serializer
          • System
          • Utility
          • View
        • Test
          • Tool
    • Utility
    • View
    • Widget
      • Xhtml
  • None
  • Test
    • Tool

Classes

  • AbstractController
  • CollectionController
  • CompositeController
  • ListComposite
  • NullRequest
  • RequestTest
  • TableController
  • TabsController

Interfaces

  • RequestHandlerInterface
  • RequestInterface
  • ValidationReportInterface
  • Overview
  • Namespace
  • Class
  • Deprecated

Class CompositeController

A composition of modules, where only one member receives the request handling calls.

A Controller is composed of modules representing actions. It determines the "current" action to be executed by looking at the request arguments.

A a top level Controller renders its parts embedded in a FORM container.

Nethgui\Module\AbstractModule implements Nethgui\Module\ModuleInterface, Nethgui\View\ViewableInterface, Nethgui\Log\LogConsumerInterface, Nethgui\Utility\PhpConsumerInterface, Nethgui\Authorization\AuthorizationAttributesProviderInterface, Nethgui\System\PlatformConsumerInterface, Nethgui\Authorization\PolicyEnforcementPointInterface
Extended by Nethgui\Module\Composite implements Nethgui\Module\ModuleCompositeInterface, Nethgui\Component\DependencyInjectorAggregate
Extended by Nethgui\Controller\CompositeController implements Nethgui\Controller\RequestHandlerInterface

Direct known subclasses

Nethgui\Controller\CollectionController, Nethgui\Controller\TableController, Nethgui\Controller\TabsController, Nethgui\Module\Help
Namespace: Nethgui\Controller
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
See: Composite
Api
Located at Controller/CompositeController.php
Methods summary
protected Nethgui\Controller\RequestInterface
# getRequest( )

Returns

Nethgui\Controller\RequestInterface
public
# bind( Nethgui\Controller\RequestInterface $request )

Overrides Composite bind() method, defining what is the current action and forwarding the call to it.

Overrides Composite bind() method, defining what is the current action and forwarding the call to it.

Parameters

$request

Implementation of

Nethgui\Controller\RequestHandlerInterface::bind()
protected string|boolean
# establishCurrentActionId( )

Decide what to do

Decide what to do

Consider the first available path segment as the action identifier. If that is missing, render the action index.

You can override this method to set a different rule.

Returns

string|boolean
The action identifier or FALSE
public Nethgui\Module\ModuleInterface
# getAction( string $identifier )

Returns the child with $identifier

Returns the child with $identifier

If the child is not found it returns NULL.

Parameters

$identifier

Returns

Nethgui\Module\ModuleInterface
protected
# hasAction( $identifier )
public
# validate( Nethgui\Controller\ValidationReportInterface $report )

Implements validate() method, forwarding the call to current action only.

Implements validate() method, forwarding the call to current action only.

Parameters

$report

Implementation of

Nethgui\Controller\RequestHandlerInterface::validate()
public
# process( )

Implements process() method, forwarding the call to current action only

Implements process() method, forwarding the call to current action only

Implementation of

Nethgui\Controller\RequestHandlerInterface::process()
public boolean
# nextPath( )

The original Framework behaviour is implemented by prepareNextViewOptimized()

The original Framework behaviour is implemented by prepareNextViewOptimized()

Returns

boolean
FALSE

See

prepareNextViewOptimized()

Implementation of

Nethgui\Controller\RequestHandlerInterface::nextPath()
public
# prepareView( Nethgui\View\ViewInterface $view )

Display all actions in a disabled state if current action is not defined, otherwise display the current action only.

Display all actions in a disabled state if current action is not defined, otherwise display the current action only.

Parameters

$view

Overrides

Nethgui\Module\AbstractModule::prepareView()
public string
# renderCurrentAction( Nethgui\Renderer\Xhtml $view )

Render callback.

Render callback.

This is the view template callback function that forwards the render message to the current action.

Note: The current action template is wrapped inside a DIV.Action tag.

Parameters

$view
The view

Returns

string
public
# renderIndex( Nethgui\Renderer\Xhtml $renderer )
protected boolean
# needsAutoFormWrap( Nethgui\Module\ModuleInterface $module )

Check if the given module is a leaf and can handle requests.

Check if the given module is a leaf and can handle requests.

Parameters

$module

Returns

boolean
Methods inherited from Nethgui\Module\Composite
addChild(), getChildren(), initialize(), loadChildren(), loadChildrenDirectory(), setDependencyInjector(), setLog(), setPlatform(), setPolicyDecisionPoint(), sortChildren()
Methods inherited from Nethgui\Module\AbstractModule
__construct(), asAuthorizationString(), getAttributesProvider(), getAuthorizationAttribute(), getIdentifier(), getLog(), getParent(), getPhpWrapper(), getPlatform(), getPolicyDecisionPoint(), getViewTemplate(), hasPlatform(), initializeAttributes(), isInitialized(), setParent(), setPhpWrapper(), setViewTemplate()
Constants inherited from Nethgui\Module\ModuleInterface
ACTION_INSTANTIATE
Constants inherited from Nethgui\Controller\RequestHandlerInterface
ACTION_MUTATE, ACTION_QUERY
Properties summary
protected Nethgui\Module\ModuleInterface $currentAction

The action where to forward method calls

The action where to forward method calls

#
Properties inherited from Nethgui\Module\Composite
$dependencyInjector
Nethgui Framework API documentation generated by ApiGen