lg-xenos/yii2-adm-mixed-galery

There is no license information available for the latest version (v1.0.3) of this package.

Yii2 widget Admin Mixed Gallery

Installs: 72

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Type:yii2-extension

v1.0.3 2018-12-16 19:12 UTC

This package is auto-updated.

Last update: 2024-04-13 19:17:16 UTC


README

Установка / Install

composer require lg-xenos/yii2-adm-mixed-galery

backend/config/bootstrap.php

Yii::$container->set('lgxenos\yii2\admMixedGallery\AdmMixedGallery', [
    'fileManagerPathTpl' => '/adm-scripts/responsivefilemanager/filemanager/dialog.php?type=1&field_id=%s&relative_url=0&callback=MixedGalleryCallBack'
]);

backend/view/test/test.php

echo  $form->field($model, 'doc_gallery')
      ->widget(\lgxenos\yii2\admMixedGallery\AdmMixedGallery::className())->label(false)

AR-Model

	public function behaviors() {
		return [
			[
				'class' => ImplodeArrayBehavior::class,
				'field' => 'gallery',
				'glue' => "\n"
			],
		];
	}

AR-rules

	public function rules() {
		return [
		    ..........
			[['gallery'], 'each', 'rule' => ['string']],
		];
	}

about