Closed niksan8989 closed 6 years ago
Sorry for the silly question. Is there a way to add my own property into class kartik\tree\TreeView? I wish It looked like this:
echo TreeView::widget([ 'query' => Product::find()->addOrderBy('root, lft'), 'headingOptions' => ['label' => 'Categories'], ... //My own property 'myOwnProperty' => 'Test' ]);
Or the only way to do this is using inheritance?
Yes only through inheritance by extending the class.
But you may want to let know if there is any enhancement to be done specific to any functionality which can be incorporated in the TreeView class.
Sorry for the silly question. Is there a way to add my own property into class kartik\tree\TreeView? I wish It looked like this:
Or the only way to do this is using inheritance?