PHP Class Horde_View_Sidebar, horde

Useful properties: - newLink: (string, optional) Link of the "New" button - newText: (string) Text of the "New" button - newExtra: (string, optional) HTML content of the extra link - containers: (array, optional) HTML content of any sidebar sections. A list of hashes with the following properties: - id: (string, optional) The container's DOM ID. - header: (array, optional) Container header, also used to toggle the section: - id: (string) The header's DOM ID. - label: (string) Header label. - collapsed: (boolean, optional) Start section collapsed? Overriden by cookies. - add: (string|array, optional) Link to add something: - url: (string) Link URL. - label: (string) Link text. - content: (string, optional) The container's HTML content. - rows: (array, optional) A list of row hashes, if 'content' is not specified. @see addRow(). - resources: (boolean, optional) Does the container contain switchable resource lists? Automatically set through addRow(). - type: (string, optional) @see addRow(). - content: (string, optional) HTML content of the sidebar, if 'containers' is not specified. Copyright 2012-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL-2). If you did not receive this file, see http://www.horde.org/licenses/lgpl.
Author: Jan Schneider ([email protected])
Inheritance: extends Horde_View
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( array $config = [] ) Constructor.
__toString ( ) : string Handler for string casting.
addNewButton ( string $label, string $url, array $extra = [] ) Adds a "New .
addRow ( array $row, string $container = '' ) Adds a row to the sidebar.
render ( string $name = 'sidebar', $locals = [] ) : string Returns the HTML code for the sidebar.

Method Details

__construct() public méthode

Constructor.
public __construct ( array $config = [] )
$config array Configuration key-value pairs.

__toString() public méthode

Handler for string casting.
public __toString ( ) : string
Résultat string The sidebar's HTML code.

addNewButton() public méthode

.." button to the sidebar.
public addNewButton ( string $label, string $url, array $extra = [] )
$label string The button text, including access key.
$url string The button URL.
$extra array Extra attributes for the link tag.

addRow() public méthode

If containers/sections are not added explicitly to the view through the "containers" property, these rows will be used instead.
public addRow ( array $row, string $container = '' )
$row array A hash with the row information. Possible values: - label: (string) The row text. - selected: (boolean) Whether to mark the row as active. - style: (string) Additional CSS styles to apply to the row. - url (string) URL to link the row to. - type (string, optional) The row type, defaults to "tree". Further $row properties depending on the type: - tree: - cssClass: (string) CSS class for the icon. - id: (string) DOM ID for the row link. - checkbox: - radiobox: - color: (string, optional) Background color. - edit: (string, optional) URL for extra edit icon.
$container string If using multiple sidebar sections, the ID of the section to add the row to. Sections will be rendered in the order of their first usage.

render() public méthode

Returns the HTML code for the sidebar.
public render ( string $name = 'sidebar', $locals = [] ) : string
$name string The template to process.
Résultat string The sidebar's HTML code.