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
$behaviors yii\base\Behavior[] List of behaviors attached to this component. This property is read-only. yii\base\Component
$count integer The number of data models in the current page. This property is read-only. yii\data\BaseDataProvider
$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
$keys array The list of key values corresponding to $models. Each data model in $models is uniquely identified by the corresponding key value in this array. yii\data\BaseDataProvider
$modelClass string The name of the Model class that will be represented. yii\data\ArrayDataProvider
$models array The list of data models in the current page. yii\data\BaseDataProvider
$pagination yii\data\Pagination|false The pagination object. If this is false, it means the pagination is disabled. Note that the type of this property differs in getter and setter. See getPagination() and setPagination() for details. yii\data\BaseDataProvider
$rulers array This property is read-only. yii\debug\models\timeline\DataProvider
$sort yii\data\Sort|boolean The sorting object. If this is false, it means the sorting is disabled. Note that the type of this property differs in getter and setter. See getSort() and setSort() for details. yii\data\BaseDataProvider
$totalCount integer Total number of possible data models. yii\data\BaseDataProvider

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\BaseObject
__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 an object property. yii\base\BaseObject
__isset() Checks if a property is set, i.e. defined and not null. yii\base\BaseObject
__set() Sets value of an object property. yii\base\BaseObject
__unset() Sets an object property to null. yii\base\BaseObject
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\BaseObject
canSetProperty() Returns a value indicating whether a property can be set. yii\base\BaseObject
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\BaseObject
hasProperty() Returns a value indicating whether a property is defined. yii\base\BaseObject
init() Initializes the object. 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() Prepares the keys associated with the currently available data models. yii\data\ArrayDataProvider
prepareModels() Prepares the data models that will be made available in the current page. yii\debug\models\timeline\DataProvider
prepareTotalCount() Returns a value indicating the total number of data models in this data provider. yii\data\ArrayDataProvider
sortModels() Sorts the data models according to the given sort definition. yii\data\ArrayDataProvider

Property Details

$panel protected property
$rulers public property

This property is read-only.

public array $rulers null

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

Prepares the data models that will be made available in the current page.

protected array prepareModels ( )
return array

The available data models