PHP code example of lispa / amos-organizzazioni

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

    

lispa / amos-organizzazioni example snippets



'modules' => [
    'organizzazioni' => [
        'class' => 'open20\amos\organizzazioni\Module'
    ],
],

If do you want to enable community creation for every single organization set this
parameter to true in your modules-amos.php config file. If this is true organization
module manager is able to create a reserved community.
These reserved communities can be made/managed by legal representative and 
operative referee.
'modules' => [
    'organizzazioni' => [
        'class' => 'open20\amos\organizzazioni\Module',
        'enableCommunityCreation' => true
    ],
],



return [
    '@vendor/open20/amos-organizzazioni/src/migrations',
];



if (isset($modules['tag'])) {
    ...
    if (isset($modules['organizzazioni'])) {
        $modules['tag']['modelsEnabled'][] = 'open20\amos\organizzazioni\models\Profilo';
        $modules['tag']['modelsEnabled'][] = 'open20\amos\organizzazioni\models\ProfiloSedi';
    }
    ...
}


'organizzazioni' => [
    'class' => 'open20\amos\organizzazioni\Module',
    ...
    'importOrganizationsConf' => [
        'keyForImport' => 'key_field',
        'mapHeaderImport' => [
            'field_1',
            'field_2',
            'key_field',
            'field_4',
            'field_5',
            ...
        ],
        '

php yii organizzazioni/import/import-organizations

'modules' => [
    'organizzazioni' => [
        'class' => 'open20\amos\organizzazioni\Module',
        ...
        'addRequired' => [
            'Profilo' => [
                'codice_fiscale',
                'tipologia_di_organizzazione'
            ],
            'ProfiloSediOperative' => [
                'email'
            ],
        ],
        ...
    ],
],
bash
php yii migrate/up --migrationPath=@vendor/open20/amos-organizzazioni/src/migrations