anli/yii2-metronic
最新稳定版本:2.0.0
Composer 安装命令:
composer require anli/yii2-metronic
包简介
Yii 2.0 Metronic Theme
关键字:
README 文档
README
Yii 2.0 Metronic Theme
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist anli/yii2-metronic "*"
or add
"anli/yii2-metronic": "*"
to the require section of your composer.json file.
Download the latest metronic files and copy the contents in the theme folder to @web/metronic/theme/.
Copy the contents of the js folder to the @web/metronic/js/ folder.
Copy the contents of the images folder to the @web/images/ folder.
Add to the module section in your config.php
'metronic' => [
'class' => 'anli\metronic\Module',
'headerPath' => '@app/views/layouts/metronic/_header',
'sidebarPath' => '@app/views/layouts/metronic/_sidebar',
'footerPath' => '@app/views/layouts/metronic/_footer',
],
Usage
Add to the view file with:
Yii::$app->controller->layout = '@vendor/anli/yii2-metronic/views/layouts/main';
Add to the controller or module file:
/**
* @inheritdoc
*/
public $layout = '@vendor/anli/yii2-metronic/views/layouts/main';
Profile widget
use anli\metronic\widgets\Profile;
...
<?php Profile::begin([
'imageUrl' => 'https://s.gravatar.com/avatar/ecd2a5b6d5a2d17e7bd9169b6f12515b?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fjo.png',
'title' => Html::encode($this->title),
'caption' => 'This is a caption',
'buttons' => [
Html::a('<i class="fa fa-pencil"></i>', false, ['value' => Url::to(["$controllerUrlName/update", 'id' => $model->id]), 'data-toggle' => 'tooltip', 'title' => "Update", 'class' => 'showModalButton btn btn-circle green-haze btn-sm', 'accesskey' => '']),
],
'statItems' => [
['title' => 74, 'caption' => 'Caption for 74'],
['title' => 23, 'caption' => 'Caption for 23'],
],
'menuItems' => [
['label' => 'Link 1', 'url' => ['site/index']],
['label' => 'Link 2', 'url' => ['site/index']],
],
'summary' => [
'title' => 'This is a title',
'caption' => 'This is a caption',
'items' => [
'<a>item A</a>',
'<a>item B</a>',
'<a>item C</a>',
],
],
]); ?>
...
<?php Profile::end(); ?>
Portlet Widget
Add to your view file with:
use anli\metronic\widgets\Portlet;
...
Body Widget
<?php anli\metronic\widgets\Body::begin(); ?>
...
<?= $content ?>
...
<?php anli\metronic\widgets\Body::end(); ?>
Header Widget
<?= anli\metronic\widgets\Header::widget([
'items' => [
Html::a('<i class="icon-share-alt"></i> Change Tenant </a>', false, ['value' => '', 'class' => 'showModalButton']),
Html::a('<i class="icon-key"></i> Log Out </a>', '', ['data-method' => 'post']),
]
]); ?>
anli/yii2-metronic 适用场景与选型建议
anli/yii2-metronic 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 307 次下载、GitHub Stars 达 5, 最近一次更新时间为 2015 年 08 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「extension」 「yii2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 anli/yii2-metronic 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 anli/yii2-metronic 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 anli/yii2-metronic 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A custom URL rule class for Yii 2 which allows to create translated URL rules
The Yii2 extension uses jQuery jquery.carousel-1.1.min.js and makes image carousel from php array of structure defined.
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
UI Kit 3 Extension for Yii2
Adds more BBCode
Define your own css rule-sets for the TYPO3 CMS backend.
统计信息
- 总下载量: 307
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 7
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-12