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 TableController

A Controller for handling a generic table CRUD scenario, and any other action defined on a table.

  • Tracks the actions involving a row
  • Tracks the actions involving the whole table
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
Extended by Nethgui\Controller\TableController implements Nethgui\Adapter\AdapterAggregateInterface
Namespace: Nethgui\Controller
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
See: Nethgui\Controller\Table\Modify
See: Nethgui\Controller\Table\Read
Api
Located at Controller/TableController.php
Methods summary
protected Nethgui\Controller\TableController
# setTableAdapter( Nethgui\Adapter\AdapterInterface $tableAdapter )

Set the adapter object that gives access to the database table

Set the adapter object that gives access to the database table

Parameters

$tableAdapter

Returns

Nethgui\Controller\TableController
public Nethgui\Adapter\AdapterInterface
# getAdapter( )

Returns

Nethgui\Adapter\AdapterInterface

Api

Implementation of

Nethgui\Adapter\AdapterAggregateInterface::getAdapter()
public boolean
# hasAdapter( )

Returns

boolean

Api

Implementation of

Nethgui\Adapter\AdapterAggregateInterface::hasAdapter()
protected Nethgui\Controller\TableController
# setColumns( array $columns )

Parameters

$columns

Returns

Nethgui\Controller\TableController
protected Nethgui\Controller\Table\AbstractAction
# getReadAction( )

Returns

Nethgui\Controller\Table\AbstractAction
protected Nethgui\Controller\TableController
# setReadAction( Nethgui\Controller\Table\AbstractAction $action )

Parameters

$action

Returns

Nethgui\Controller\TableController

Throws

LogicException
public
# initialize( )

Propagates initialize() message to children.

Propagates initialize() message to children.

See

Nethgui\Module\Composite::loadChildren()

Api

Overrides

Nethgui\Module\Composite::initialize()
public Composite
# addChild( Nethgui\Module\ModuleInterface $childAction )

Add $childAction to the TableController, and propagate the table adapter, if it has not been done yet.

Add $childAction to the TableController, and propagate the table adapter, if it has not been done yet.

Parameters

$childAction

Returns

Composite

Overrides

Nethgui\Module\Composite::addChild()
public Nethgui\Controller\TableController
# addRowAction( Nethgui\Controller\Table\AbstractAction $action )

A row action is executed in a row context (i.e. row updating, deletion...)

A row action is executed in a row context (i.e. row updating, deletion...)

Parameters

$action

Returns

Nethgui\Controller\TableController

See

Nethgui\Controller\TableController::getRowActions()
public Nethgui\Controller\TableController
# addRowActionPluggable( Nethgui\Controller\Table\AbstractAction $action, string $path = 'Plugin' )

Enable $action to be expanded by instantiating all the classes under the given $path.

Enable $action to be expanded by instantiating all the classes under the given $path.

Parameters

$action
$path

Returns

Nethgui\Controller\TableController
public array
# getRowActions( )

Actions for a single row of the table

Actions for a single row of the table

Returns

array
public Nethgui\Controller\TableController
# addTableAction( Nethgui\Module\ModuleInterface $a )

A table action involves the whole table (i.e. create a new row, print the table...)

A table action involves the whole table (i.e. create a new row, print the table...)

Returns

Nethgui\Controller\TableController

See

Nethgui\Controller\TableController::getTableActions()
public Nethgui\Controller\TableController
# addTableActionPluggable( Nethgui\Controller\Table\AbstractAction $action, string $path = 'Plugin' )

Enable $action to be expanded by instantiating all the classes under the given $path.

Enable $action to be expanded by instantiating all the classes under the given $path.

Parameters

$action
$path

Returns

Nethgui\Controller\TableController

See

Nethgui\Controller\TableController::addRowActionPluggable()
Nethgui\Controller\TableController::addTableAction()
public array
# getTableActions( )

Actions for the whole table

Actions for the whole table

Returns

array
public
# renderIndex( Nethgui\Renderer\Xhtml $renderer )

Overrides

Nethgui\Controller\CompositeController::renderIndex()
public
# onParametersSaved( Nethgui\Module\ModuleInterface $currentAction, array $changes, array $parameters )

Parameters

$currentAction
The current action
$changes
changed parameters list
$parameters
Parameters for $currentAction
Methods inherited from Nethgui\Controller\CompositeController
bind(), establishCurrentActionId(), getAction(), getRequest(), hasAction(), needsAutoFormWrap(), nextPath(), prepareView(), process(), renderCurrentAction(), validate()
Methods inherited from Nethgui\Module\Composite
getChildren(), 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\Controller\RequestHandlerInterface
ACTION_MUTATE, ACTION_QUERY
Constants inherited from Nethgui\Module\ModuleInterface
ACTION_INSTANTIATE
Properties inherited from Nethgui\Controller\CompositeController
$currentAction
Properties inherited from Nethgui\Module\Composite
$dependencyInjector
Nethgui Framework API documentation generated by ApiGen