PHP code example of maks757 / common-library

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

    

maks757 / common-library example snippets


'components' => [
        'library' => [
            'class' => \common\modules\library\LibraryComponent::className(),
            //default alias @frontend/web + array items
            'dirs' => [
                '/images',
                '/textEditor',
                '/info',
                '/pdf',
                '/video',
                '/Musik',
            ],
            //search type files
            'file_type' => [
                '.gif', 
                '.png', 
                '.jpg', 
                '.jpeg', 
                '.svg', 
                '.pdf', 
                '.mp4', 
                '.webm', 
                '.mp3', 
                '.ogg', 
                '.wav'
            ]
        ],
        //...
]

'modules' => [
        'lib' => [
            'class' => \common\modules\library\LibraryModule::className()
        ],
        //...
],