Builder::table()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Foundation\Overrides\Yajra\DataTables\Html;
6
7
use Illuminate\Support\HtmlString;
8
use Yajra\DataTables\Html\Builder as BaseBuilder;
9
10
class Builder extends BaseBuilder
11
{
12
    /**
13
     * Generate DataTable's table html.
14
     *
15
     * @param array $attributes
16
     * @param bool  $drawFooter
17
     * @param bool  $drawSearch
18
     *
19
     * @return \Illuminate\Support\HtmlString
20
     */
21
    public function table(array $attributes = [], $drawFooter = false, $drawSearch = false)
22
    {
23
        $this->tableAttributes = array_merge($this->getTableAttributes(), $attributes);
24
        $htmlAttr = $this->html->attributes($this->tableAttributes);
25
        $tableHtml = '<table '.$htmlAttr.'></table>';
26
27
        return new HtmlString($tableHtml);
28
    }
29
}
30