Skip to content

Commit

Permalink
Rename function registerRenderersRecursively to registerDependenciesR…
Browse files Browse the repository at this point in the history
…ecursively
  • Loading branch information
amelkikh committed Aug 11, 2016
1 parent 5d5af26 commit 687ced1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions JqPlot.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function registerJqPlotWidget()
*/
protected function registerJqPlotClientOptions($id)
{
$this->registerRenderersRecursively($this->clientOptions);
$this->registerDependenciesRecursively($this->clientOptions);

$data = Json::htmlEncode($this->data);
$options = !empty($this->clientOptions) ? Json::htmlEncode($this->clientOptions) : '{}';
Expand All @@ -113,7 +113,7 @@ protected function registerJqPlotClientOptions($id)
* Find renderers and register their JS plugins
* @param array $data
*/
public function registerRenderersRecursively($data)
public function registerDependenciesRecursively($data)
{
// Looking for renderers
foreach ($data as $k => $v) {
Expand All @@ -122,7 +122,7 @@ public function registerRenderersRecursively($data)
} elseif ($k == 'pointLabels' && isset($v['show']) && (boolean)$v['show']) {
Yii::$app->assetManager->bundles[JqPlotAsset::className()]->js[] = 'plugins/jqplot.pointLabels.js';
} elseif (is_array($v)) {
$this->registerRenderersRecursively($v);
$this->registerDependenciesRecursively($v);
}
}

Expand Down

0 comments on commit 687ced1

Please sign in to comment.