maks757/embeddable-gallery
Composer 安装命令:
composer require maks757/embeddable-gallery
包简介
Embeddable gallery, to be attached to any model
关键字:
README 文档
README
Embeddable gallery, to be attached to any model
backend config
'modules' => [ 'egallery' => [ 'class' => \maks757\egallery\GalleryModule::className() ], //... ],
common config
'components' => [ 'egallery' => [ 'class' => \maks757\imagable\Imagable::className(), 'imageClass' => CreateImageMetaMulti::className(), 'nameClass' => GenerateName::className(), 'imagesPath' => '@frontend/web/images', 'categories' => [ 'category' => [ 'egallery' => [ 'size' => [ 'origin' => [ 'width' => 0, 'height' => 0, ] ] ] ] ] ], //... ],
views
<?php if(!empty($model->id)): ?> <?= $form->field(new \maks757\egallery\components\UploadForm(), 'imageFiles[]')->widget(FileInput::className(), [ 'options' => [ 'multiple' => true, 'accept' => 'image/*' ], 'pluginOptions' => [ 'showRemove' => false, 'previewFileType' => 'image', 'maxFileCount' => 20, 'uploadUrl' => Url::toRoute(['/egallery/image/upload']), 'uploadExtraData' => [ 'id' => $model->id, 'key' => $model->className() ], ], 'pluginEvents' => [ 'fileuploaded' => 'function() { $.pjax.reload({container:"#pjax_block", timeout: 100000, url: "'.Url::to('', true).'"}); }' ] ])->label('Загрузка изображений') ?> <?php Pjax::begin(['enablePushState' => false, 'id' => 'pjax_block']) ?> <?= \maks757\egallery\widgets\show_images\Gallery::widget(['object' => $model, 'show_name' => false]) ?> <?php Pjax::end() ?> <?php endif; ?>
统计信息
- 总下载量: 70
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-02-14
