Answer the question
In order to leave comments, you need to log in
How to change variable from dmstr/AdminLTE extension?
I noticed that in the dmstr / AdminLTE menu it substitutes its classes, not classes, and this interferes with the constantly updated FontAwesome a little - some icons do not want to be displayed in any way.
I found a variable in the code that substitutes this prefix and I want to change it to "empty-empty". You can, of course, correct this in the dmstr / AdminLTE code itself, but this change will fail when dmstr / AdminLTE is updated ... Tell me
, how can I override this variable in the view?
Answer the question
In order to leave comments, you need to log in
If you need more than once, then the advice above, if you need it globally, then I use a container through DI and change the settings globally for any class. For example, like this:
namespace app;
class Bootstrap implements \yii\base\BootstrapInterface
{
/**
* Bootstrap method to be called during application bootstrap stage.
*
* @param \yii\base\Application $app the application currently running
*/
public function bootstrap($app)
{
$this->gridViewSetting();
}
/**
* Применение настроек для yii\grid\GridView и yii\widgets\DetailView
*/
protected function gridViewSetting()
{
$gridSetting = [
'tableOptions' => ['class' => 'table table-condensed'],
'options' => ['class' => 'table-responsive'],
'summary' => false
];
\Yii::$container->set('yii\grid\GridView', $gridSetting);
$viewSetting = [
'options' => ['class' => 'table'],
];
\Yii::$container->set('yii\widgets\DetailView', $viewSetting);
}
}
<?php
namespace app;
class Bootstrap implements \yii\base\BootstrapInterface
{
/**
* Bootstrap method to be called during application bootstrap stage.
*
* @param \yii\base\Application $app the application currently running
*/
public function bootstrap($app)
{
$MenuSetting = [
'iconClassPrefix' => '',
];
\Yii::$container->set('dmstr\widgets\Menu', $MenuSetting);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question