{"id":13411491,"url":"https://github.com/dmstr/yii2-adminlte-asset","last_synced_at":"2025-05-14T09:08:39.981Z","repository":{"id":21367926,"uuid":"24685208","full_name":"dmstr/yii2-adminlte-asset","owner":"dmstr","description":"AdminLTE Asset Bundle for Backend Theme in Yii2 Framework","archived":false,"fork":false,"pushed_at":"2023-09-29T21:10:53.000Z","size":2666,"stargazers_count":1137,"open_issues_count":17,"forks_count":425,"subscribers_count":118,"default_branch":"master","last_synced_at":"2024-10-29T15:18:14.986Z","etag":null,"topics":["admin-dashboard","admin-ui","adminlte","yii2","yii2-asset"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmstr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-01T16:11:17.000Z","updated_at":"2024-08-06T15:54:52.000Z","dependencies_parsed_at":"2024-05-30T13:28:04.762Z","dependency_job_id":"f35f6ce4-e867-4d04-8afb-96536ca8d9a6","html_url":"https://github.com/dmstr/yii2-adminlte-asset","commit_stats":{"total_commits":210,"total_committers":31,"mean_commits":6.774193548387097,"dds":0.5761904761904761,"last_synced_commit":"daa3cb27113db7858564d3c525d217982fc22a6b"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmstr%2Fyii2-adminlte-asset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmstr%2Fyii2-adminlte-asset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmstr%2Fyii2-adminlte-asset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmstr%2Fyii2-adminlte-asset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmstr","download_url":"https://codeload.github.com/dmstr/yii2-adminlte-asset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248334902,"owners_count":21086471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin-dashboard","admin-ui","adminlte","yii2","yii2-asset"],"created_at":"2024-07-30T20:01:14.039Z","updated_at":"2025-04-11T03:26:36.910Z","avatar_url":"https://github.com/dmstr.png","language":"PHP","funding_links":[],"categories":["PHP","Themes 主题模板"],"sub_categories":[],"readme":"AdminLTE Asset Bundle\n=====================\n\n[![Latest Stable Version](https://poser.pugx.org/dmstr/yii2-adminlte-asset/v/stable.svg)](https://packagist.org/packages/dmstr/yii2-adminlte-asset) \n[![Total Downloads](https://poser.pugx.org/dmstr/yii2-adminlte-asset/downloads.svg)](https://packagist.org/packages/dmstr/yii2-adminlte-asset)\n[![License](https://poser.pugx.org/dmstr/yii2-adminlte-asset/license.svg)](https://packagist.org/packages/dmstr/yii2-adminlte-asset)\n\n\n*Backend UI for Yii2 Framework, based on [AdminLTE](https://github.com/almasaeed2010/AdminLTE)*\n\n![\"Yii2 AdminLTE Presentation\"](https://cloud.githubusercontent.com/assets/874234/7603896/753228ee-f943-11e4-9d42-2a31b41eb42d.jpg)\n\nThis package contains an [Asset Bundle for Yii 2.0 Framework](http://www.yiiframework.com/doc-2.0/guide-structure-assets.html) \nwhich registers the CSS files for the AdminLTE user-interface.\n\nThe CSS files are installed via Yii's recommended usage of the `fxp/composer-asset-plugin` v1.1.1 or later.\n\n\nInstallation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nTo install AdminLTE v2 run:\n\n```\ncomposer require dmstr/yii2-adminlte-asset \"^2.1\"\n```\n\nTo install AdminLTE v1 run:\n\n```\ncomposer require dmstr/yii2-adminlte-asset \"^1\"\n```\n\nFAQ\n---\n\n### Web-font usage\n\nAdminLTE dropped web-font inclusion in `2.4.0`, so you need to include your desired font manually, ie.\n\n    \u003clink rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic\"\u003e\n\n\u003e Inclusion via CDN is not recommended for production, please adjust this to your project's asset-bundling workflow.\n\nFor details see [#140](https://github.com/dmstr/yii2-adminlte-asset/issues/140).\n\n### Upgrading\n\nWhen upgrading please see the [AdminLTE upgrade guide](https://adminlte.io/docs/3.0/upgrade-guide.html) for adjustments you need to make in your views.\n\n### Composer installation\n\n- For issues with `DmitryBaranovskiy/eve.git`, please see [#128](https://github.com/dmstr/yii2-adminlte-asset/issues/128#issuecomment-361895922) and [#113](https://github.com/dmstr/yii2-adminlte-asset/issues/133#issuecomment-337179853).\n\n### Compatibility matrix\n\n| yii2-adminlte-asset | AdminLTE | Font Awesome\n|---|---|---|\n| 2.4 | 2.0 - 2.3 | required\n| 2.5 | 2.4 | required\n| 3.0 | 2.4 | -\n\n\u003e For other [issues](https://github.com/dmstr/yii2-adminlte-asset/issues?utf8=%E2%9C%93\u0026q=is%3Aissue), please search GitHub first.\n\n\nQuick Start\n-----------\n\nOnce the extension is installed, you can have a **preview** by reconfiguring the path mappings of the view component:\n\nFor Yii 2 [Advanced Application Template](https://github.com/yiisoft/yii2-app-advanced) or [Basic Application Template](https://github.com/yiisoft/yii2-app-basic)\n\n```php\n'components' =\u003e [\n    'view' =\u003e [\n         'theme' =\u003e [\n             'pathMap' =\u003e [\n                '@app/views' =\u003e '@vendor/dmstr/yii2-adminlte-asset/example-views/yiisoft/yii2-app'\n             ],\n         ],\n    ],\n],\n```\n\n\nFor [phd5](https://github.com/dmstr/phd5-app) application\n\n```php\n'components' =\u003e [\n    'view' =\u003e [\n        'theme' =\u003e [\n            'pathMap' =\u003e [\n                '@app/views' =\u003e '@vendor/dmstr/yii2-adminlte-asset/example-views/testing/app'\n            ],\n        ],\n    ],\n],\n```\n\nThis asset bundle provides sample files for layout and view (see folder `examples/`), they are **not meant to be customized directly in the `vendor/` folder**.\n\nTherefore it is recommended to **copy the views into your application** and adjust them to your needs.\n\n\nCustomization\n-------------\n\n- Copy files from `vendor/dmstr/yii2-adminlte-asset/example-views/yiisoft/yii2-app` (or other theme) to `@app/views`.\n- Remove the custom `view` configuration from your application by deleting the path mappings, if you have made them before.\n- Edit your views adhering to html markup `vendor/almasaeed2010/adminlte/pages`\n\n### AdminLTE Plugins\n\nAssets for [AdminLTE plugins](https://adminlte.io/docs/3.0/dependencies.html#plugins) are not included\nin our `AdminLteAsset` but you can find these files in your vendor directory under `vendor/almasaeed2010/adminlte/plugins`.\nSo if you want to use any of them we recommend to create a custom bundle where you list the plugin files you need:\n\n\n```php\nuse yii\\web\\AssetBundle;\nclass AdminLtePluginAsset extends AssetBundle\n{\n    public $sourcePath = '@vendor/almasaeed2010/adminlte/plugins';\n    public $css = [\n        'chart.js/Chart.min.css',\n        // more plugin CSS here\n    ];\n    public $js = [\n        'chart.js/Chart.bundle.min.js'\n        // more plugin Js here\n    ];\n    public $depends = [\n        'dmstr\\adminlte\\web\\AdminLteAsset',\n    ];\n}\n```\n\nAs this asset depends on our `AdminLteAsset` it's the only asset you have to register, for example in\nyour `main.php` layout file.\n\n\n### Custom content header\n\nIf you want to use native DOM of headers AdminLTE\n\n```html\n\u003ch1\u003e\n    About \u003csmall\u003estatic page\u003c/small\u003e\n\u003c/h1\u003e\n```\n\nthen you can follow the code:\n\n```php\n/* @var yii\\web\\View $this */\n\n$this-\u003eparams['breadcrumbs'][] = 'About';\n\n$this-\u003ebeginBlock('content-header'); ?\u003e\nAbout \u003csmall\u003estatic page\u003c/small\u003e\n\u003c?php $this-\u003eendBlock(); ?\u003e\n\n\u003cdiv class=\"site-about\"\u003e\n    \u003cp\u003e This is the About page. You may modify the following file to customize its content: \u003c/p\u003e\n    \u003ccode\u003e\u003c?= __FILE__ ?\u003e\u003c/code\u003e\n\u003c/div\u003e\n```\n\n### Left sidebar menu - Widget Menu\n\nIf you need to separate sections of the menu then just add the `header` option to item in `items`\n```php\n    'items' =\u003e [\n        ['label' =\u003e 'Gii', 'iconType' =\u003e 'far' 'icon' =\u003e 'file-code', 'url' =\u003e ['/gii']],\n        ['label' =\u003e 'Debug', 'icon' =\u003e 'dashboard-alt', 'url' =\u003e ['/debug']],\n        ['label' =\u003e 'MAIN NAVIGATION', 'header' =\u003e true], // here\n        // ... a group items\n        ['label' =\u003e '', 'header' =\u003e true],\n        // ... a group items\n        ['label' =\u003e '', 'header' =\u003e true],\n        // ... a group items\n```\n\nTo add a badge for a item:\n\n```php\n'items' =\u003e [\n    [\n        'label' =\u003e 'Mailbox',\n        'iconType' =\u003e 'far',\n        'icon' =\u003e 'envelope',\n        'url' =\u003e ['/mailbox'],\n        'badge' =\u003e '\u003cspan class=\"badge badge-info right\"\u003e123\u003c/span\u003e'\n    ],\n]\n```\n\nBy default to icons will be added prefix of [Font Awesome](https://fontawesome.com/)\n\n### Template for Gii CRUD generator\n\nTell Gii about our template. The setting is made in the config file:\n\n```php\nif (YII_ENV_DEV) {\n    $config['modules']['gii'] = [\n        'class' =\u003e 'yii\\gii\\Module',\n        'generators' =\u003e [ // HERE\n            'crud' =\u003e [\n                'class' =\u003e 'yii\\gii\\generators\\crud\\Generator',\n                'templates' =\u003e [\n                    'adminlte' =\u003e '@vendor/dmstr/yii2-adminlte-asset/gii/templates/crud/simple',\n                ]\n            ]\n        ],\n    ];\n}\n```\n\nTesting\n-------\n\nGo to the tests folder and start the testing stack\n\n    cd tests\n    docker-compose up -d\n    \nInstall `yii2-adminlte-asset` in the testing application\n\n    docker-compose exec php composer install\n    \nOpen testing URLs in your browser\n\n    http://docker.local:20580/test\n    http://docker.local:20580/test/login    \n\n\nFurther Information\n-------------------\n\nFor AdminLTE documentation, please read https://almsaeedstudio.com/themes/AdminLTE/documentation/index.html\n\n\u003e Namespacing rules follow the Yii 2.0 framework structure, eg. `dmstr\\adminlte\\web` for the Asset Bundle.\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmstr%2Fyii2-adminlte-asset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmstr%2Fyii2-adminlte-asset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmstr%2Fyii2-adminlte-asset/lists"}