PHP code example of nullref / yii2-core

1. Go to this page and download the library: Download nullref/yii2-core 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/ */

    

nullref / yii2-core example snippets


 return [];

 
$config = ge($config, []);


$modules = .
    'modules' => $modules,
//...
];
return $config;

[
 /** App config **/
 'components' => [
  'i18n' => [
      'translations' => [
          '*' => ['class' => 'yii\i18n\PhpMessageSource'],
          'admin' => ['class' => 'nullref\core\components\i18n\PhpMessageSource'],
      ],
  ],
 ]
]

/** module config **/
'productManager' => [
    "class" => "nullref\\product\\components\\EntityManager",
    'hasImage' => false,
    'hasStatus' => false,
    'model' => [
        'class' => 'app\\models\\Product',
        'relations' => [
            'category' => 'nullref\\category\\behaviors\\HasCategory',
            'vendor' => 'app\\behaviors\\HasVendor',
        ],
    ],
    'searchModel' => 'app\\models\\ProductSearch',
],
/** ... **/

php yii module/install <module-name>