Skip to content

Commit

Permalink
Some fix, update copyrights
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-wdmg committed Jun 25, 2023
1 parent 8f70cea commit 5fbc6e2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
=========

## 2.0.0 (2023-06-25)
* Some fix, update copyrights

## 1.0.8 (2021-05-10)
* Added counter stats method

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 - 2020 W.D.M.Group, Ukraine
Copyright (c) 2019 - 2023 W.D.M.Group, Ukraine

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 19 additions & 5 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
* Yii2 Subscribers
*
* @category Module
* @version 1.0.8
* @version 2.0.0
* @author Alexsander Vyshnyvetskyy <[email protected]>
* @link https://github.com/wdmg/yii2-subscribers
* @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;

Expand Down Expand Up @@ -45,7 +46,7 @@ class Module extends BaseModule
/**
* @var string the module version
*/
private $version = "1.0.8";
private $version = "2.0.0";

/**
* @var string, route to web for manage subscription
Expand Down Expand Up @@ -78,7 +79,7 @@ public function init()
/**
* {@inheritdoc}
*/
public function dashboardNavItems($options = false)
public function dashboardNavItems($options = null)
{
$items = [
'label' => $this->name,
Expand All @@ -98,7 +99,20 @@ public function dashboardNavItems($options = false)
],
]
];
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;
}

/**
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Subscribers manager for Yii2.

This module is an integral part of the [Butterfly.СMS](https://butterflycms.com/) content management system, but can also be used as an standalone extension.

Copyrights (c) 2019-2021 [W.D.M.Group, Ukraine](https://wdmg.com.ua/)
Copyrights (c) 2019-2023 [W.D.M.Group, Ukraine](https://wdmg.com.ua/)

# Requirements
* PHP 5.6 or higher
Expand Down Expand Up @@ -65,11 +65,7 @@ Use the `Module::dashboardNavItems()` method of the module to generate a navigat
?>

# Status and version [ready to use]
* v.2.0.0 - Some fix, update copyrights
* v.1.0.8 - Added counter stats method
* v.1.0.7 - Fixed migrations and extend module dashboardNavItems() method
* v.1.0.6 - Update dependencies, README.md
* v.1.0.5 - Refactoring log of activity
* v.1.0.4 - Up to date dependencies
* v.1.0.3 - Refactoring import/export of subscribers
* v.1.0.2 - Fixed deprecated class declaration
* v.1.0.1 - Functionality for import/export of subscribers
* v.1.0.6 - Update dependencies, README.md
2 changes: 1 addition & 1 deletion commands/InitController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function actionIndex($params = null)
'║ ║'. "\n" .
'║ SUBSCRIBERS MODULE, v.'.$version.''. "\n" .
'║ by Alexsander Vyshnyvetskyy ║'. "\n" .
'║ (c) 2019-2021 W.D.M.Group, Ukraine ║'. "\n" .
'║ (c) 2019-2023 W.D.M.Group, Ukraine ║'. "\n" .
'║ ║'. "\n" .
'╚════════════════════════════════════════════════╝';
echo $name = $this->ansiFormat($welcome . "\n\n", Console::FG_GREEN);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["yii2", "yii2-subscribers", "subscribers manager", "wdmg"],
"type": "yii2-extension",
"license": "MIT",
"version": "1.0.8",
"version": "2.0.0",
"homepage": "https://github.com/wdmg/yii2-subscribers",
"support": {
"source": "https://github.com/wdmg/yii2-subscribers",
Expand Down

0 comments on commit 5fbc6e2

Please sign in to comment.