Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ AdminLTE and other Bootstrap-specific libraries will adjust accordingly.

### Asset Libraries

* [AdminLTE](https://adminlte.io) - Admin dashboard template
* [Bootstrap](https://getbootstrap.com) - Mobile-first front-end CSS framework directed at responsive web development
* [DataTables](https://datatables.net) - To enhance the accessibility of data in HTML tables
* [FontAwesome](https://fontawesome.com) - Popular icon set and toolkit for vector icons and social logos
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
],
"require": {
"php": "^7.3 || ^8.0",
"almasaeed2010/adminlte": "^3.0",
"datatables.net/datatables.net-bs4": "dev-master",
"fortawesome/font-awesome": "^5.15",
"components/jquery": "^3.3",
Expand Down
19 changes: 19 additions & 0 deletions src/Bundles/AdminLTEBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Tatter\Frontend\Bundles;

use Tatter\Frontend\FrontendBundle;

class AdminLTEBundle extends FrontendBundle
{
/**
* Applies any initial inputs after the constructor.
*/
protected function define(): void
{
$this
->addPath('adminlte/css/adminlte.min.css')
->addPath('adminlte/js/adminlte.min.js')
->merge(new BootstrapBundle());
}
}
11 changes: 11 additions & 0 deletions src/Publishers/AdminLTEPublisher.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Tatter\Frontend\Publishers;

use Tatter\Frontend\FrontendPublisher;

class AdminLTEPublisher extends FrontendPublisher
{
protected $source = 'vendor/almasaeed2010/adminlte/dist';
protected $path = 'adminlte';
}
11 changes: 11 additions & 0 deletions tests/BundlesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ public function testBundlesFiles(string $class, array $expectedHeadFiles, array
public function bundleProvider()
{
return [
[
AdminLTEBundle::class,
[
'adminlte.min.css',
'bootstrap.min.css',
'jquery.min.js',
],
[
'adminlte.min.js',
],
],
[
BootstrapBundle::class,
[
Expand Down
9 changes: 9 additions & 0 deletions tests/PublishersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ public function testPublishesFiles(string $class, array $expected): void
public function publisherProvider()
{
return [
[
AdminLTEPublisher::class,
[
'adminlte/css/adminlte.css',
'adminlte/img/AdminLTELogo.png',
'adminlte/js/adminlte.js',
'adminlte/js/adminlte.min.js.map',
],
],
[
BootstrapPublisher::class,
[
Expand Down