Skip to content

Commit

Permalink
split widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
hail committed Apr 22, 2021
1 parent daa706f commit 8896d56
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Copy files from @vendor/hail812/yii2-adminlte3/src/views to @app/views, then edi
simply use:

```php
<?= \hail812\adminlte3\widgets\Alert::widget([
<?= \hail812\adminlte\widgets\Alert::widget([
'type' => 'success',
'body' => '<h3>Congratulations!</h3>'
]) ?>
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"php": ">=7.0",
"yiisoft/yii2": "~2.0.0",
"yiisoft/yii2-bootstrap4": "~2.0.8",
"almasaeed2010/adminlte": "~3.1"
"almasaeed2010/adminlte": "~3.1",
"hail812/yii2-adminlte-widgets": "~1.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/views/layouts/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<!-- Sidebar Menu -->
<nav class="mt-2">
<?php
echo \hail812\adminlte3\widgets\Menu::widget([
echo \hail812\adminlte\widgets\Menu::widget([
'items' => [
[
'label' => 'Starter Pages',
Expand Down
4 changes: 2 additions & 2 deletions src/views/site/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<div class="container-fluid">
<div class="row">
<div class="col-lg-6">
<?= \hail812\adminlte3\widgets\Alert::widget([
<?= \hail812\adminlte\widgets\Alert::widget([
'type' => 'success',
'body' => '<h3>Congratulations!</h3>',
]) ?>
<?= \hail812\adminlte3\widgets\Callout::widget([
<?= \hail812\adminlte\widgets\Callout::widget([
'type' => 'danger',
'head' => 'I am a danger callout!',
'body' => 'There is a problem that we need to fix. A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.'
Expand Down
5 changes: 5 additions & 0 deletions src/widgets/Alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
use yii\base\ErrorException;
use yii\bootstrap4\Widget;

/**
* Class Alert
* @deprecated https://packagist.org/packages/hail812/yii2-adminlte-widgets
* @package hail812\adminlte3\widgets
*/
class Alert extends Widget
{
public $alertTypes = [
Expand Down
1 change: 1 addition & 0 deletions src/widgets/Callout.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use yii\helpers\Html;

/**
* @deprecated https://packagist.org/packages/hail812/yii2-adminlte-widgets
* Class Callout
* @package hail812\adminlte3\widgets
* @example
Expand Down
1 change: 1 addition & 0 deletions src/widgets/FlashAlert.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use yii\bootstrap4\Widget;

/**
* @deprecated https://packagist.org/packages/hail812/yii2-adminlte-widgets
* Class FlashAlert
* @package hail812\adminlte3\widgets
*
Expand Down
1 change: 1 addition & 0 deletions src/widgets/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use yii\helpers\Url;

/**
* @deprecated https://packagist.org/packages/hail812/yii2-adminlte-widgets
* Class Menu
* @package hail812\adminlte3\widgets
*
Expand Down

0 comments on commit 8896d56

Please sign in to comment.