PHP Class Tools\View\Helper\TimelineHelper

You need to include your css and js file, manually: echo $this->Html->script('timeline/timeline'); echo $this->Html->css('/js/timeline/timeline');
Inheritance: extends Cake\View\Helper
Afficher le fichier Open project: dereuromark/cakephp-tools Class Usage Examples

Méthodes publiques

Свойство Type Description
$helpers array

Protected Properties

Свойство Type Description
$_defaultConfig array ..
$_items array

Méthodes publiques

Méthode Description
addItem ( array $item ) : void Add timeline item.
addItems ( array $items ) : void Add timeline items as an array of items.
finalize ( boolean $return = false ) : void | string Finalize the timeline and write the javascript to the buffer.

Méthodes protégées

Méthode Description
_date ( DateTime | null $date = null ) : string Format date to JS code.
_format ( array $items ) : string Format items to JS code
_options ( array $options ) : string Format options to JS code

Method Details

_date() protected méthode

Format date to JS code.
protected _date ( DateTime | null $date = null ) : string
$date DateTime | null
Résultat string

_format() protected méthode

Format items to JS code
See also: Tools\View\Helper\TimelineHelper::addItem()
protected _format ( array $items ) : string
$items array
Résultat string

_options() protected méthode

Format options to JS code
protected _options ( array $options ) : string
$options array
Résultat string

addItem() public méthode

Requires at least: - start (date or datetime) - content (string) Further data options: - end (date or datetime) - group (string) - className (string) - editable (boolean)
public addItem ( array $item ) : void
$item array
Résultat void

addItems() public méthode

Add timeline items as an array of items.
See also: Tools\View\Helper\TimelineHelper::addItem()
public addItems ( array $items ) : void
$items array
Résultat void

finalize() public méthode

Make sure that your view does also output the buffer at some place!
public finalize ( boolean $return = false ) : void | string
$return boolean If the output should be returned instead
Résultat void | string Javascript if $return is true

Property Details

$_defaultConfig protected_oe property

..
protected array $_defaultConfig
Résultat array

$_items protected_oe property

protected array $_items
Résultat array

$helpers public_oe property

public array $helpers
Résultat array