PHP Class yii\debug\components\TimelineDataProvider

Since: 2.0.7
Author: Dmitriy Bashkarev ([email protected])
Inheritance: extends yii\data\ArrayDataProvider
Exibir arquivo Open project: yiisoft/yii2-debug

Protected Properties

Property Type Description
$panel yii\debug\panels\TimelinePanel

Public Methods

Method Description
__construct ( TimelinePanel $panel, array $config = [] ) TimelineDataProvider constructor.
getColor ( array $model ) : string Getting HEX color based on model duration
getCssClass ( array $model ) : string Returns item, css class
getLeft ( array $model ) : float Returns the offset left item, percentage of the total width
getRulers ( integer $line = 10 ) : array ruler items, key milliseconds, value offset left
getTime ( array $model ) : float Returns item duration, milliseconds
getWidth ( array $model ) : float Returns item width percent of the total width

Protected Methods

Method Description
prepareModels ( )

Method Details

__construct() public method

TimelineDataProvider constructor.
public __construct ( TimelinePanel $panel, array $config = [] )
$panel yii\debug\panels\TimelinePanel
$config array

getColor() public method

Getting HEX color based on model duration
public getColor ( array $model ) : string
$model array
return string

getCssClass() public method

Returns item, css class
public getCssClass ( array $model ) : string
$model array
return string

getLeft() public method

Returns the offset left item, percentage of the total width
public getLeft ( array $model ) : float
$model array
return float

getRulers() public method

ruler items, key milliseconds, value offset left
public getRulers ( integer $line = 10 ) : array
$line integer number of columns
return array

getTime() public method

Returns item duration, milliseconds
public getTime ( array $model ) : float
$model array
return float

getWidth() public method

Returns item width percent of the total width
public getWidth ( array $model ) : float
$model array
return float

prepareModels() protected method

protected prepareModels ( )

Property Details

$panel protected_oe property

protected TimelinePanel,yii\debug\panels $panel
return yii\debug\panels\TimelinePanel