-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update copyrights, fix menu dashboard
- Loading branch information
Showing
8 changed files
with
32 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,15 @@ | |
* Yii2 Views | ||
* | ||
* @category Module | ||
* @version 1.0.1 | ||
* @version 1.1.0 | ||
* @author Alexsander Vyshnyvetskyy <[email protected]> | ||
* @link https://github.com/wdmg/yii2-views | ||
* @copyright Copyright (c) 2019 - 2021 W.D.M.Group, Ukraine | ||
* @copyright Copyright (c) 2019 - 2023 W.D.M.Group, Ukraine | ||
* @license https://opensource.org/licenses/MIT Massachusetts Institute of Technology (MIT) License | ||
* | ||
*/ | ||
|
||
use wdmg\helpers\ArrayHelper; | ||
use Yii; | ||
use wdmg\base\BaseModule; | ||
use wdmg\views\components\Views; | ||
|
@@ -51,7 +52,7 @@ class Module extends BaseModule | |
/** | ||
* @var string the module version | ||
*/ | ||
private $version = "1.0.1"; | ||
private $version = "1.1.0"; | ||
|
||
/** | ||
* @var integer, priority of initialization | ||
|
@@ -76,15 +77,28 @@ public function init() | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function dashboardNavItems($options = false) | ||
public function dashboardNavItems($options = null) | ||
{ | ||
$items = [ | ||
'label' => $this->name, | ||
'url' => [$this->routePrefix . '/'. $this->id], | ||
'icon' => 'fa fa-fw fa-eye', | ||
'active' => in_array(\Yii::$app->controller->module->id, [$this->id]) | ||
]; | ||
return $items; | ||
|
||
if (!is_null($options)) { | ||
|
||
if (isset($options['count'])) { | ||
$items['label'] .= '<span class="badge badge-default float-right">' . $options['count'] . '</span>'; | ||
unset($options['count']); | ||
} | ||
|
||
if (is_array($options)) | ||
$items = ArrayHelper::merge($items, $options); | ||
|
||
} | ||
|
||
return $items; | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,9 @@ | |
* Yii2 Views | ||
* | ||
* @category Component | ||
* @version 1.0.1 | ||
* @author Alexsander Vyshnyvetskyy <[email protected]> | ||
* @link https://github.com/wdmg/yii2-views | ||
* @copyright Copyright (c) 2019 - 2021 W.D.M.Group, Ukraine | ||
* @copyright Copyright (c) 2019 - 2023 W.D.M.Group, Ukraine | ||
* @license https://opensource.org/licenses/MIT Massachusetts Institute of Technology (MIT) License | ||
* | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.