PHP code example of i-avatar777 / yii2-widget-kolada-dar1

1. Go to this page and download the library: Download i-avatar777/yii2-widget-kolada-dar1 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/ */

    

i-avatar777 / yii2-widget-kolada-dar1 example snippets


echo \avatar\widgets\KoladaDar1\KoladaDar1::widget([
    'dayStart'  => 9,
]); 

echo \avatar\widgets\KoladaDar1\KoladaDar1::widget([
    'dayStart'    => 9,
    'isSacral'    => true,
    'optionsWeek' => [
         1 => ['style' => 'background-color: #000000; color: #ffffff;'],
         2 => ['style' => 'background-color: #ffa6a6;'],
         3 => ['style' => 'background-color: #ffd2a6;'],
         4 => ['style' => 'background-color: #ffffa6;'],
         5 => ['style' => 'background-color: #a7fca4;'],
         6 => ['style' => 'background-color: #a6a6ff;'],
         7 => ['style' => 'background-color: #bda5d1;'],
         8 => ['style' => 'background-color: #d4a6f7;'],
         9 => ['style' => 'background-color: #ffffff;'],
     ],
    'optionsColumn' => [
        1 => ['style' => 'width: 90px;'],
        2 => ['style' => 'width: 90px;'],
        3 => ['style' => 'width: 90px;'],
        4 => ['style' => 'width: 90px;'],
        5 => ['style' => 'width: 90px;'],
        6 => ['style' => 'width: 90px;'],
     ],
    'weekDays' => [
        1 => 'Понедельникъ',
        2 => 'Вторникъ',
        3 => 'Третейникъ',
        4 => 'Четверикъ',
        5 => 'Пятница',
        6 => 'Шестица',
        7 => 'Седьмица',
        8 => 'Осьмица',
        9 => 'Неделя',
    ],
    'emptyCell'         => '&nbsp;',
    'isDrawIds'         => true,
    'isDrawDateGrigor'  => true,
    'DateGrigorFormat'  => 'd.m.Y',
    'tableOptions'      => ['class' => 'table table-hover table-striped'],
    'monthNames'        => [
        1 => '1 Рамхатъ',
        2 => '2 Айлѣтъ',
        3 => '3 Бейлѣтъ',
        4 => '4 Гэйлѣтъ',
        5 => '5 Дайлѣтъ',
        6 => '6 Элѣтъ',
        7 => '7 Вэйлѣтъ',
        8 => '8 Хейлѣтъ',
        9 => '9 Тайлѣтъ',
    ],
    'cellFormat'       => function (DateTime $d, $options) {
        $day = $options['day'];

        return $day . Html::tag('span', ' / ' . \iAvatar777\services\DateRus\DateRus::format('j K', $d->format('U')), ['style' => 'color:#ccc; font-size:70%;']);
    },
]);