Class yii\debug\models\timeline\DataProvider
Inheritance | yii\debug\models\timeline\DataProvider » yii\data\ArrayDataProvider |
---|---|
Available since version | 2.0.8 |
DataProvider implements a data provider based on a data array.
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$panel | yii\debug\panels\TimelinePanel | yii\debug\models\timeline\DataProvider |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | DataProvider constructor. | yii\debug\models\timeline\DataProvider |
getColor() | Getting HEX color based on model duration | yii\debug\models\timeline\DataProvider |
getCssClass() | Returns item, css class | yii\debug\models\timeline\DataProvider |
getLeft() | Returns the offset left item, percentage of the total width | yii\debug\models\timeline\DataProvider |
getMemory() | ` php
[
0 => string, memory usage (MB)
1 => float, Y position (percent)
] |
yii\debug\models\timeline\DataProvider |
getRulers() | Ruler items, key milliseconds, value offset left | yii\debug\models\timeline\DataProvider |
getTime() | Returns item duration, milliseconds | yii\debug\models\timeline\DataProvider |
getWidth() | Returns item width percent of the total width | yii\debug\models\timeline\DataProvider |
Protected Methods
Method | Description | Defined By |
---|---|---|
prepareModels() | yii\debug\models\timeline\DataProvider |
Property Details
Method Details
DataProvider constructor.
public void __construct ( yii\debug\panels\TimelinePanel $panel, $config = [] ) | ||
$panel | yii\debug\panels\TimelinePanel | |
$config | array |
Getting HEX color based on model duration
public string getColor ( $model ) | ||
$model | array |
Returns item, css class
public string getCssClass ( $model ) | ||
$model | array |
Returns the offset left item, percentage of the total width
public float getLeft ( $model ) | ||
$model | array |
`
php
[
0 => string, memory usage (MB)
1 => float, Y position (percent)
]
public array|null getMemory ( $model ) | ||
$model | array |
Ruler items, key milliseconds, value offset left
public array getRulers ( $line = 10 ) | ||
$line | integer | Number of columns |
Returns item duration, milliseconds
public float getTime ( $model ) | ||
$model | array |
Returns item width percent of the total width
public float getWidth ( $model ) | ||
$model | array |
protected void prepareModels ( ) |