Class yii\debug\models\timeline\DataProvider

Inheritanceyii\debug\models\timeline\DataProvider » yii\data\ArrayDataProvider » yii\data\BaseDataProvider » yii\base\Component » yii\base\BaseObject
Implementsyii\base\Configurable, yii\data\DataProviderInterface
Available since version2.0.8
Source Code https://github.com/yiisoft/yii2-debug/blob/master/models/timeline/DataProvider.php

DataProvider implements a data provider based on a data array.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$allModels array The data that is not paginated or sorted. yii\data\ArrayDataProvider
$id string An ID that uniquely identifies the data provider among all data providers. yii\data\BaseDataProvider
$key string|callable The column that is used as the key of the data models. yii\data\ArrayDataProvider
$modelClass string The name of the Model class that will be represented. yii\data\ArrayDataProvider

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Component
__clone() This method is called after the object is created by cloning an existing one. yii\base\Component
__construct() DataProvider constructor. yii\debug\models\timeline\DataProvider
__get() Returns the value of a component property. yii\base\Component
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Component
__set() Sets the value of a component property. yii\base\Component
__unset() Sets a component property to be null. yii\base\Component
attachBehavior() Attaches a behavior to this component. yii\base\Component
attachBehaviors() Attaches a list of behaviors to the component. yii\base\Component
behaviors() Returns a list of behaviors that this component should behave as. yii\base\Component
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Component
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Component
className() Returns the fully qualified name of this class. yii\base\BaseObject
detachBehavior() Detaches a behavior from the component. yii\base\Component
detachBehaviors() Detaches all behaviors from the component. yii\base\Component
ensureBehaviors() Makes sure that the behaviors declared in behaviors() are attached to this component. yii\base\Component
getBehavior() Returns the named behavior object. yii\base\Component
getBehaviors() Returns all behaviors attached to this component. yii\base\Component
getColor() Getting HEX color based on model duration yii\debug\models\timeline\DataProvider
getCount() Returns the number of data models in the current page. yii\data\BaseDataProvider
getCssClass() Returns item, css class yii\debug\models\timeline\DataProvider
getKeys() Returns the key values associated with the data models. yii\data\BaseDataProvider
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
getModels() Returns the data models in the current page. yii\data\BaseDataProvider
getPagination() Returns the pagination object used by this data provider. yii\data\BaseDataProvider
getRulers() Ruler items, key milliseconds, value offset left yii\debug\models\timeline\DataProvider
getSort() Returns the sorting object used by this data provider. yii\data\BaseDataProvider
getTime() Returns item duration, milliseconds yii\debug\models\timeline\DataProvider
getTotalCount() Returns the total number of data models. yii\data\BaseDataProvider
getWidth() Returns item width percent of the total width yii\debug\models\timeline\DataProvider
hasEventHandlers() Returns a value indicating whether there is any handler attached to the named event. yii\base\Component
hasMethod() Returns a value indicating whether a method is defined. yii\base\Component
hasProperty() Returns a value indicating whether a property is defined for this component. yii\base\Component
init() {@inheritdoc} yii\data\BaseDataProvider
off() Detaches an existing event handler from this component. yii\base\Component
on() Attaches an event handler to an event. yii\base\Component
prepare() Prepares the data models and keys. yii\data\BaseDataProvider
refresh() Refreshes the data provider. yii\data\BaseDataProvider
setKeys() Sets the key values associated with the data models. yii\data\BaseDataProvider
setModels() Sets the data models in the current page. yii\data\BaseDataProvider
setPagination() Sets the pagination for this data provider. yii\data\BaseDataProvider
setSort() Sets the sort definition for this data provider. yii\data\BaseDataProvider
setTotalCount() Sets the total number of data models. yii\data\BaseDataProvider
trigger() Triggers an event. yii\base\Component

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
prepareKeys() {@inheritdoc} yii\data\ArrayDataProvider
prepareModels() {@inheritdoc} yii\debug\models\timeline\DataProvider
prepareTotalCount() {@inheritdoc} yii\data\ArrayDataProvider
sortModels() Sorts the data models according to the given sort definition. yii\data\ArrayDataProvider

Property Details

$panel protected property

Method Details

__construct() public method

DataProvider constructor.

public void __construct ( yii\debug\panels\TimelinePanel $panel, $config = [] )
$panel yii\debug\panels\TimelinePanel
$config array
getColor() public method

Getting HEX color based on model duration

public string getColor ( $model )
$model array
getCssClass() public method

Returns item, css class

public string getCssClass ( $model )
$model array
getLeft() public method

Returns the offset left item, percentage of the total width

public float getLeft ( $model )
$model array
getMemory() public method

`php [ 0 => string, memory usage (MB) 1 => float, Y position (percent) ]

public array|null getMemory ( $model )
$model array
getRulers() public method

Ruler items, key milliseconds, value offset left

public array getRulers ( $line 10 )
$line integer

Number of columns

getTime() public method

Returns item duration, milliseconds

public float getTime ( $model )
$model array
getWidth() public method

Returns item width percent of the total width

public float getWidth ( $model )
$model array
prepareModels() protected method

{@inheritdoc}

protected void prepareModels ( )