summaryrefslogtreecommitdiffstats
path: root/vendor/ipl/web/src/Common/BaseTarget.php
blob: 080f6c665ae35a2fde5e027e4528708669bfc636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php

namespace ipl\Web\Common;

/**
 * @method \ipl\Html\Attributes getAttributes()
 */
trait BaseTarget
{
    /**
     * Get the data-base-target attribute
     *
     * @return string|null
     */
    public function getBaseTarget(): ?string
    {
        /** @var ?string $baseTarget */
        $baseTarget = $this->getAttributes()->get('data-base-target')->getValue();

        return $baseTarget;
    }

    /**
     * Set the data-base-target attribute
     *
     * @param string $target
     *
     * @return $this
     */
    public function setBaseTarget(string $target): self
    {
        $this->getAttributes()->set('data-base-target', $target);

        return $this;
    }
}