定制 maks757/yii2-honors 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

maks757/yii2-honors

Composer 安装命令:

composer require maks757/yii2-honors

包简介

This component allows users to work with the achievements.

README 文档

README

status extension dev

Install

composer.phar require maks757/yii2-honors

or

composer require maks757/yii2-honors

and applying migrations

php yii migrate --migrationPath=@vendor/maks757/yii2-honors/migrations

or

yii migrate --migrationPath=@vendor/maks757/yii2-honors/migrations

Configuration

main.php (config)
'modules' => [
    'honor' => [
        'class' => \bl\honors\HonorsModule::className()
    ],
],
'components' => [
    // Images config
    'imagableHonor' => [
        'class' => 'bl\imagable\Imagable',
        'imageClass' => \bl\honors\components\image\CreateImageImagine::className(),
        'nameClass' => \bl\honors\components\image\GenerateName::className(),
        'imagesPath' => '@frontend/web/honorImage',
        'categories' => [
            'category' => [
                'honor' => [
                    'origin' => false,
                    'size' => [
                        'long' => [
                            'width' => 500,
                            'height' => 500,
                        ],
                        'short' => [
                            'width' => 200,
                            'height' => 200,
                        ],
                    ]
                ],
            ]
        ]
    ],
    // ...
]

url to list honor = admin panel url + /honor/honor/list url to create honor = admin panel url + /honor url to list user honor = admin panel url + /honor/honor/user

Using

Go to add new honor Alt text and add new honor Alt text and add honor to user Alt text

Using example

//action 
//honors
    $honors = HonorUser::find()->where(['user_id' => $userId])->with(['honor.translations'])->all();
//
//view
<?php if (!empty($honors)): ?>
    <div class="col-md-12">
            <h3 class="about-user">Honors:</h3>
        <div class="row text-center" style="padding: 2px 10px;">
            <?php /** @var $honor \bl\honors\entities\HonorUser*/?>
            <?php foreach ($honors as $honor): ?>
                <div class="col-xs-4 col-sm-3 col-md-1" style="padding: 0;">
                    <img src="<?= $honor->honor->getImage($honor->honor->image) ?>"
                         width="50" height="50"
                         data-toggle="tooltip" data-placement="top"
                         title="<?= $honor->honor->translation->name ?>">
                </div>
            <?php endforeach; ?>
        </div>
    </div>
<?php endif; ?>

Alt text

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GNU
  • 更新时间: 2016-09-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固