PHP code example of intermundia / yiicms

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

    

intermundia / yiicms example snippets


    'user' => [
        'class' => \intermundia\yiicms\web\User::class,
        'enableSession' => false,
        'identityClass' => \intermundia\yiicms\models\User::class
    ]
    

    'sync' => [
        'class' => \intermundia\yiicms\console\controllers\SyncController::class,
    ],
    'utils' => [
        'class' => \intermundia\yiicms\console\controllers\UtilsController::class,
    ],
    

    'websites' => [
        'website key1' => [
            'defaultContentId' => "content tree id",
            'masterLanguage' => 'en-US',
            "storageUrl" => 'storage url',
            "domains" => [
                'domain1' => 'en-US',
                'domain2' => 'en-US',
            ]
        ],
        'website key2' => [
            'defaultContentId' => "content tree id",
            'masterLanguage' => 'en-US',
            "storageUrl" => 'storage url',
            "domains" => [
                'domain1' => 'en-US',
                'domain2' => 'en-US',
            ]
        ]
    ]
    

    'domain1' => [
        'language' => 'en-US',
        'isProduction' => false,
        'isFrontend' => true
    ]
    

    'mywebsite.com' => [
        'defaultContentId' => 1234,
        'masterLanguage' => 'en-US',
        "storageUrl" => 'mywebsite.com/storage/web',
        "domains" => [
            'mywebsite.com' => [
                'language' => 'en-US',
                'isProduction' => true,
                'isFrontend' => true
            ],
            'admin.mywebsite.com' => 'en-US', // You can leave en-US as string which means that isProduction and isFrontend both are false
        ]
    ]
    

    php console/yii migrate --migrationPath=@cmsCore/migrations
    
 
    php console/yii utils/switch-language en en-US
    
 
    php console/yii sync/languages 
    
 
    php console/yii sync/websites 
    
 
    php console/yii utils/copy-language $fromWebsiteKey $toWebsiteKey $from $to
    
 
    php console/yii utils/add-language $websiteKey $from $to
    
 
      php console/yii utils/fix-alias-and-file-manager-items $websiteKey
   

php composer.phar