PHP code example of lg-xenos / yii2-adm-mixed-galery

1. Go to this page and download the library: Download lg-xenos/yii2-adm-mixed-galery library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lg-xenos / yii2-adm-mixed-galery example snippets


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

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

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

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