Skip to content

Commit

Permalink
Fix tree titleBlock_options when instanceof Closure
Browse files Browse the repository at this point in the history
  • Loading branch information
ereminmdev committed Jun 10, 2021
1 parent 5ba1711 commit 8dc0391
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/Crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,9 @@ public function getTreeTitleBlock($model, $controller)
{
$block = $this->getConfig('tree.titleBlock', function ($model, $controller, $crud) {
$text = $this->getConfig('tree.titleBlock_text', $model->title);

$options = $this->getConfig('tree.titleBlock_options', []);
$options = $options instanceof Closure ? call_user_func_array($options, [$model, $controller, $this]) : $options;

$hover = $this->getConfig('tree.titleBlock_onHover', '');
$hover = $hover instanceof Closure ? call_user_func_array($hover, [$model, $controller, $this]) : $hover;
Expand Down

0 comments on commit 8dc0391

Please sign in to comment.