PHP code example of grozzzny / catalog
1. Go to this page and download the library: Download grozzzny/catalog 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/ */
grozzzny / catalog example snippets
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationPath' => [
'@grozzzny/catalog/migrations',
],
],
],
'modules' => [
'catalog' => [
'class' => 'grozzzny\catalog\CatalogModule',
],
],
'i18n' => [
'translations' => [
'catalog' => [
'class' => 'yii\i18n\PhpMessageSource',
'sourceLanguage' => 'en-US',
'basePath' => '@grozzzny/catalog/messages',
],
],
],
'container' => [
'singletons' => [
'grozzzny\catalog\models\Category' => ['class' => 'app\models\Category'],
],
],
<?
$i18n = json_encode([
'select_category' => Yii::t('catalog','Select category..'),
'key' => Yii::t('catalog','Key'),
'value' => Yii::t('catalog','Value'),
...
'filter_show' => Yii::t('catalog','Show in filter'),
], JSON_UNESCAPED_UNICODE);
if ($property->settings->filter_range){
...
}
bash
php yii migrate --migrationPath=@vendor/grozzzny/catalog/migrations