index.php 1.99 KB
<?php
    
    /* @var $this yii\web\View */
    
    use artweb\artbox\core\helpers\ImageHelper;
    use artweb\artbox\gentelella\widgets\XPanel;
    use yii\bootstrap\Collapse;
    
    $this->title = 'My Yii Application';
?>
<?php
    $panel = XPanel::begin(
        [
            'title' => 'Test',
        ]
    );
    echo Collapse::widget(
        [
            'items'        => [
                // equivalent to the above
                [
                    'label'          => '<p>Collapsible Group Item #1</p>',
                    'content'        => 'Anim pariatur cliche...',
                    // open its content by default
                    'contentOptions' => [ 'class' => 'in' ],
                ],
                // another group item
                [
                    'label'   => 'Collapsible Group Item #1',
                    'content' => 'Anim pariatur cliche...',
                ],
                // if you want to swap out .panel-body with .list-group, you may use the following
                [
                    'label'   => 'Collapsible Group Item #1',
                    'content' => [
                        'Anim pariatur cliche...',
                        'Anim pariatur cliche...',
                    ],
                    'footer'  => 'Footer'
                    // the footer label in list-group
                ],
                [
                    'label'   => 'Collapsible Group Item #1',
                    'content' => [
                        'Anim pariatur cliche...',
                        'Anim pariatur cliche...',
                    ],
                    'footer'  => 'Footer',
                    // the footer label in list-group
                ],
            ],
            'options'      => [
                'class' => 'accordion',
            ],
            'encodeLabels' => false,
        ]
    );
    $panel::end();
    
    return ImageHelper::set('@storage/test.jpg')
                      ->resize(150, 150)
                      ->done();


?>