Completed
Push — master ( 1680b9...7d3d6e )
by Mohamed
15s queued 11s
created

Widget::container()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
namespace Microboard\Foundations;
4
5
use Arrilot\Widgets\AbstractWidget;
6
7
class Widget extends AbstractWidget
8
{
9
    /**
10
     * Async and reloadable widgets are wrapped in container.
11
     * You can customize it by overriding this method.
12
     *
13
     * @return array
14
     */
15
    public function container()
16
    {
17
        $size = $this->config['size'] ?? 'col-xl-3 xol-md-4';
18
19
        return [
20
            'element'       => 'div',
21
            'attributes'    => 'class="'. $size .'"',
22
        ];
23
    }
24
25
    /**
26
     * Determine if the widget should be displayed.
27
     *
28
     * @return bool
29
     */
30
    public function shouldBeDisplayed()
31
    {
32
        return true;
33
    }
34
}
35