Page::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 11
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Website\Grid\Filters;
6
7
use AbterPhp\Framework\Grid\Component\Filters;
8
use AbterPhp\Framework\Grid\Filter\ExactFilter;
9
use AbterPhp\Framework\Grid\Filter\LikeFilter;
10
11
class Page extends Filters
12
{
13
    /**
14
     * Page constructor.
15
     *
16
     * @param string[]    $intents
17
     * @param array       $attributes
18
     * @param string|null $tag
19
     */
20
    public function __construct(array $intents = [], array $attributes = [], ?string $tag = null)
21
    {
22
        parent::__construct($intents, $attributes, $tag);
23
24
        $this->nodes[] = new ExactFilter('identifier', 'website:pageIdentifier');
25
26
        $this->nodes[] = new LikeFilter('title', 'website:pageTitle');
27
28
        $this->nodes[] = new LikeFilter('lede', 'website:pageLede');
29
30
        $this->nodes[] = new LikeFilter('body', 'website:pageBody');
31
    }
32
}
33