PHP code example of coolanole / yii2-gallery-manager
1. Go to this page and download the library: Download coolanole/yii2-gallery-manager 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/ */
coolanole / yii2-gallery-manager example snippets
class m150318_154933_gallery_ext
extends coolanole\yii2\galleryManager\migrations\m140930_003227_gallery_manager
{
}
use coolanole\yii2\galleryManager\GalleryManagerAction;
class ProductController extends Controller
{
...
public function actions()
{
return [
'galleryApi' => [
'class' => GalleryManagerAction::className(),
// mappings between type names and model classes (should be the same as in behaviour)
'types' => [
'product' => Product::className()
]
],
];
}