xplo.re Medusa Core Framework 3.2
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
      • Driver
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Fault
      • Formatter
        • Driver
      • Incident
        • Exception
      • Reporter
        • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • Type
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • Listing

Class Listing

Tabular listing with page navigation controls and pre-defined layout support.

A listing is used for tabular data and has per default alternating row colours for improved readability. Navigation controls, if required, are attached to the top and bottom of the listing and provide single page navigation to the previous and next page and jump navigation to the first, last and a selectable page via a drop-down.

Groups are implemented using spanning rows, are visually highlighted and implement dynamic collapsing of all rows of a group via a click on the group header row.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\View\Driver\coreui\Control implements Core\Configurable
Extended by Core\View\Driver\coreui\Control\Table
Extended by Core\View\Driver\coreui\Control\Table\Listing
Namespace: Core\View\Driver\coreui\Control\Table
Package: CoreUI\Control
Since: 3.1
Requires: PHP 5.3
Version: 1.0
Located at View/Driver/coreui/Control/Table/Listing.inc.php

Methods summary

public
# __construct( Core\View\Driver\coreui $proxy, array $options = null )

Parameters

$proxy
CoreUI proxy instance that created this element instance.
$options

Associative key-value array of options to set. Equals a call to the Core\View\Driver\coreui\Control::setOptions() method after constructing a new instance.

Since

3.1

Overrides

Core\View\Driver\coreui\Control::__construct
public string
# __toString( )

Renders the HTML code for the control.

Renders the HTML code for the control.

Returns

string

Since

3.1

Overrides

Core\View\Driver\coreui\Control::__toString
protected Core\View\Driver\coreui\Element
# _renderNavigation( )

Creates a navigation bar. Each instance can only be used once, as child nodes have JavaScript dependencies attached to their IDs and an ID must be unique per HTML document.

Creates a navigation bar. Each instance can only be used once, as child nodes have JavaScript dependencies attached to their IDs and an ID must be unique per HTML document.

Returns

Core\View\Driver\coreui\Element
Navigation bar root element.

Since

3.1
public
# add( array $entries, array $parameters = null )

Adds a new data row.

Adds a new data row.

Parameters

$entries

Array of cell values for the new table row. Values are treated verbatim, i.e. raw text needs to be encoded before calling this method. If the value is an array, it is expected to be an associative array which may have the following keys:

  • value

    Value for the row. Treated the same as a standard non-array value.

  • class

    Class name or space-separated list of multiple class names to asign to the cell node.

  • Each other key-value combination is treated as attributes that are assigned to the cell node.

$parameters

Associative array of configuration parameters for the new row. Supports the following keys:

  • cell-node-name

    Element tag name to be used for cells. Defaults to "td".

  • class

    Class name of space-separated list of multiple class names to assign to row element node.

  • Each other key-value combination is treated as attributes that are assigned to the row element node.

Returns


$this

Since

3.1
public Core\View\Driver\coreui\Element
# addGroup( string $contents, array $properties = null )

Adds a new group header. All rows that are added afterwards will be part of the most recently added group header.

Adds a new group header. All rows that are added afterwards will be part of the most recently added group header.

Parameters

$contents
Group header contents (value is not automatically encoded).
$properties

Associative array of group settings. Supports the following keys:

  • collapsed

    If value evaluates to true, the group is per default collapsed.

Returns

Core\View\Driver\coreui\Element
Added spanning row element.

Since

3.1
public
# addSpanning( mixed $entry, array $parameters = null )

Adds a new spanning row.

Adds a new spanning row.

Parameters

$entry
See Core\View\Driver\coreui\Control\Table\Listing::add() for details. Behaves identical to a single entry.
$parameters
See Core\View\Driver\coreui\Control\Table\Listing::add() for details.

Returns


$this

Since

3.1
public string
# id( )

Returns an automatically assigned ID for the control. The ID is generated on first request and buffered by the control. An ID is unique per instance and automatically reset if a control is cloned.

Returns an automatically assigned ID for the control. The ID is generated on first request and buffered by the control. An ID is unique per instance and automatically reset if a control is cloned.

Returns

string
ID of control (or central element by the control).

Since

3.1

Overrides

Core\View\Driver\coreui\Control::id
protected array
# processCell( string $cellNode, mixed $cell )

Processes cell entries and returns the corresponding element descriptors.

Processes cell entries and returns the corresponding element descriptors.

Parameters

$cellNode
Name of cell node element to use.
$cell
See Core\View\Driver\coreui\Control\Table\Listing::add() for details. Behaves identical to a single entry.

Returns

array

Element descriptors for the cell. Contains the following entries:

  1. Cell node descriptor.

  2. The raw cell value.

  3. An associative array of cell attributes.

Since

3.1
protected array
# processRowParameters( array $parameters = null )

Processes row parameters and returns the corresponding element descriptors.

Processes row parameters and returns the corresponding element descriptors.

Parameters

$parameters
See Core\View\Driver\coreui\Control\Table\Listing::add() for a description of supported parameters.

Returns

array

Element descriptors for the row. Contains the following entries:

  1. Row node descriptor.

  2. Cell node descriptor.

Since

3.1
public
# setHeader( array $header )

Sets the table header cells.

Sets the table header cells.

Parameters

$header

Array of cell header entries. Behaves identical to the entries parameter of the Core\View\Driver\coreui\Control\Table\Listing::add() method.

Returns


$this

Since

3.1
public
# setId( $id )

Since

3.1
public
# setLayout( array $layout )

Sets the table layout.

Sets the table layout.

Parameters

$layout
See Core\View\Driver\coreui\Element\TABLE::setLayout() for details.

Returns


$this

Since

3.1
public
# setNavigation( array $navigation )

Sets navigation options.

Sets navigation options.

Parameters

$navigation

Associative array with navigation options or null to disable navigation controls. The following options are supported:

  • controller

    Target controller. Defaults to null (current controller).

  • action

    Target action. Defaults to null (current action).

  • parameters

    Associative key-value array of target parameters. Should contain an entry for the page name key to identify the current page. Otherwise the current page is considered to be 1.

  • page-name

    Parameter key for the page. Will be set to the page number of each navigation target link. Defaults to "page".

  • page-count

    Total number of pages. Defaults to 1.

Returns


$this

Since

3.1

Methods inherited from Core\View\Driver\coreui\Control

_T(), __clone(), derive(), on(), setOption(), setOptions(), setTitle(), setTranslator()

Methods inherited from Core\Set

__get(), __isset()

Methods inherited from Core\Object

__autocreateFactory(), __call(), __processParameters(), attachMethod(), chain(), getValueForKey(), getValueForKeyPath(), getValueForUndefinedKey(), hash(), issetValueForKey(), setValueForKey(), setValueForKeyPath(), setValueForUndefinedKey(), uuid()

Constants summary

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

protected Core\View\Driver\coreui\Element\TABLE $_v_control

Table element node.

Table element node.

Since

3.1
#

Properties inherited from Core\View\Driver\coreui\Control

$_id, $_v_options, $_v_proxy, $_v_translator

Magic properties

public read-only Core\View\Driver\coreui\Element $control

Root element node for control.

Magic properties inherited from Core\View\Driver\coreui\Control

$id, $options, $proxy, $translator

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.2 API documentation generated by ApiGen