PHP code example of iiifx-production / yii2-autocomplete-helper

1. Go to this page and download the library: Download iiifx-production/yii2-autocomplete-helper 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/ */

    

iiifx-production / yii2-autocomplete-helper example snippets


    'bootstrap' => ['log', 'autocomplete'],
    'components' => [
        'autocomplete' => [
            'class' => 'iiifx\Yii2\Autocomplete\Component',
        ],
        # ...
    ]

    'bootstrap' => ['log', 'autocomplete'],
    'components' => [
        'autocomplete' => [
            'class' => 'iiifx\Yii2\Autocomplete\Component',
        ],
        # ...
    ]

    'bootstrap' => ['log', 'new-component-name'], # <-- new component name
    'components' => [
        'new-component-name' => [ # <-- new component name
            'class' => 'iiifx\Yii2\Autocomplete\Component',
        ],
        # ...
    ]

    'bootstrap' => ['log', 'autocomplete'],
    'components' => [
        'autocomplete' => [
            'class' => 'iiifx\Yii2\Autocomplete\Component',
            'environment' => 'local', # <-- environment
        ],
        # ...
    ]

    'bootstrap' => ['log', 'autocomplete'],
    'components' => [
        'autocomplete' => [
            'class' => 'iiifx\Yii2\Autocomplete\Component',
            'controllerMap' => [
                'ide-components' => 'iiifx\Yii2\Autocomplete\Controller', # <-- default controller
                'my-custom-generator' => 'path\to\your\custom\Controller', # <-- your controller
            ],
        ],
        # ...
    ]

    'bootstrap' => ['log', 'autocomplete'],
    'components' => [
        'autocomplete' => [
            'class' => 'iiifx\Yii2\Autocomplete\Component',
            'result' => '@app/new-file-name.php' # <-- name and path
        ],
        # ...
    ]

    'bootstrap' => ['log', 'autocomplete'],
    'components' => [
        'autocomplete' => [
            'class' => 'iiifx\Yii2\Autocomplete\Component',
            'config' => [
                '@common/config/main.php', # <-- config list
                '@common/config/main-local.php',
                '@console/config/main.php',
                '@console/config/main-local.php',
                '@backend/config/main.php',
                '@backend/config/main-local.php',
                '@frontend/config/main.php',
                '@frontend/config/main-local.php',
            ],
        ],
        # ...
    ]

    'bootstrap' => ['log', 'autocomplete'],
    'components' => [
        'autocomplete' => [
            'class' => 'iiifx\Yii2\Autocomplete\Component',
            'config' => [
                '@app/config/console.php', # <-- config list
                '@app/config/web.php',
            ],
        ],
        # ...
    ]

    'bootstrap' => ['log', 'autocomplete'],
    'components' => [
        'autocomplete' => [
            'class' => 'iiifx\Yii2\Autocomplete\Component',
            'config' => [
                'frontend' => [
                    '@common/config/main.php', # <-- frontend group
                    '@common/config/main-local.php',
                    '@frontend/config/main.php',
                    '@frontend/config/main-local.php',
                ],
                'backend' => [
                    '@common/config/main.php', # <-- backend group
                    '@common/config/main-local.php',
                    '@backend/config/main.php',
                    '@backend/config/main-local.php',
                ],
                'api' => [
                    '@common/config/main.php', # <-- api group
                    '@common/config/main-local.php',
                    '@common/../api/config/main.php',
                    '@common/../api/config/main-local.php',
                ],
            ],
        ],
        # ...
    ]

    'bootstrap' => ['log', 'autocomplete'],
    'components' => [
        'autocomplete' => [
            'class' => 'iiifx\Yii2\Autocomplete\Component',
            'webAppClass' => '\full\namespace\to\WebApplicationClass',
            'consoleAppClass' => '\full\namespace\to\ConsoleApplicationClass',
        ],
        # ...
    ]
bash
php yii ide-components
bash
Yii2 IDE auto-completion helper
Vitaliy IIIFX Khomenko, 2019

Success: /home/iiifx/Projects/myProject/_ide_components.php
bash
php yii ide-components --config=api