PHP code example of kak / area

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

    

kak / area example snippets


 kak\widgets\area\Area::begin([
        'label' => 'add params',
        'items' => [
            ['key' => 'key.name'],
            ['key' => 'key.name1'],
            ['key' => 'key.name2' , 'value' => '2'],
            ['key' => 'key.name3'],
        ]
]);


$models = PostParams::findOne($id);
kak\widgets\area\Area::widget([
    'item' => new PostParams,
    'items' => $models,
    'viewParams' => [
        'form' => $form
    ],
    'viewItem' => '@app\views\post\_item-post-param'
]);


 kak\widgets\area\Area::widget([
     'item' => new PostParams,
     'items' => $models,
     'viewParams' => [
         'form' => $form
     ],
     'viewItem' => function($params, $thisArea){
        
     },
 ]);   

php composer.phar