W3cubDocs

/Yii 2.0

Class yii\debug\models\timeline\DataProvider

Inheritance yii\debug\models\timeline\DataProvider » yii\data\ArrayDataProvider » yii\data\BaseDataProvider » yii\base\Component » yii\base\Object
Implements yii\base\Configurable, yii\data\DataProviderInterface
Available since version 2.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

Property Type Description Defined 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 yii\base\Component
$count integer The number of data models in the current page. 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. 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. yii\data\BaseDataProvider
$rulers array yii\debug\models\timeline\DataProvider
$sort yii\data\Sort|boolean The sorting object. yii\data\BaseDataProvider
$totalCount integer Total number of possible data models. yii\data\BaseDataProvider

Protected Properties

Property Type Description Defined By
$panel yii\debug\panels\TimelinePanel yii\debug\models\timeline\DataProvider

Public Methods

Method Description Defined By
__call() Calls the named method which is not a class method. yii\base\Object
__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\Object
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Object
__set() Sets value of an object property. yii\base\Object
__unset() Sets an object property to null. yii\base\Object
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\Object
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Object
className() Returns the fully qualified name of this class. yii\base\Object
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\Object
hasProperty() Returns a value indicating whether a property is defined. yii\base\Object
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

Method Description Defined 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

protected yii\debug\panels\TimelinePanel $panel = null

$rulers public read-only property

public array getRulers ( $line = 10 )

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

© 2008–2017 by Yii Software LLC
Licensed under the three clause BSD license.
http://www.yiiframework.com/doc-2.0/yii-debug-models-timeline-dataprovider.html