Skip to content

Commit e61d332

Browse files
committed
Add AdminLTE
1 parent 859bfb0 commit e61d332

File tree

6 files changed

+52
-0
lines changed

6 files changed

+52
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ AdminLTE and other Bootstrap-specific libraries will adjust accordingly.
4646

4747
### Asset Libraries
4848

49+
* [AdminLTE](https://adminlte.io) - Admin dashboard template
4950
* [Bootstrap](https://getbootstrap.com) - Mobile-first front-end CSS framework directed at responsive web development
5051
* [DataTables](https://datatables.net) - To enhance the accessibility of data in HTML tables
5152
* [FontAwesome](https://fontawesome.com) - Popular icon set and toolkit for vector icons and social logos

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
],
2424
"require": {
2525
"php": "^7.3 || ^8.0",
26+
"almasaeed2010/adminlte": "^3.0",
2627
"datatables.net/datatables.net-bs4": "dev-master",
2728
"fortawesome/font-awesome": "^5.15",
2829
"components/jquery": "^3.3",

src/Bundles/AdminLTEBundle.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace Tatter\Frontend\Bundles;
4+
5+
use Tatter\Frontend\FrontendBundle;
6+
7+
class AdminLTEBundle extends FrontendBundle
8+
{
9+
/**
10+
* Applies any initial inputs after the constructor.
11+
*/
12+
protected function define(): void
13+
{
14+
$this
15+
->addPath('adminlte/css/adminlte.min.css')
16+
->addPath('adminlte/js/adminlte.min.js')
17+
->merge(new BootstrapBundle());
18+
}
19+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Tatter\Frontend\Publishers;
4+
5+
use Tatter\Frontend\FrontendPublisher;
6+
7+
class AdminLTEPublisher extends FrontendPublisher
8+
{
9+
protected $source = 'vendor/almasaeed2010/adminlte/dist';
10+
protected $path = 'adminlte';
11+
}

tests/BundlesTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ public function testBundlesFiles(string $class, array $expectedHeadFiles, array
5656
public function bundleProvider()
5757
{
5858
return [
59+
[
60+
AdminLTEBundle::class,
61+
[
62+
'adminlte.min.css',
63+
'bootstrap.min.css',
64+
'jquery.min.js',
65+
],
66+
[
67+
'adminlte.min.js',
68+
],
69+
],
5970
[
6071
BootstrapBundle::class,
6172
[

tests/PublishersTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ public function testPublishesFiles(string $class, array $expected): void
3636
public function publisherProvider()
3737
{
3838
return [
39+
[
40+
AdminLTEPublisher::class,
41+
[
42+
'adminlte/css/adminlte.css',
43+
'adminlte/img/AdminLTELogo.png',
44+
'adminlte/js/adminlte.js',
45+
'adminlte/js/adminlte.min.js.map',
46+
],
47+
],
3948
[
4049
BootstrapPublisher::class,
4150
[

0 commit comments

Comments
 (0)