Debian Codegraph @

vendor/ipl/web/src/Common/BaseTarget.php

raw
1 <?php
2
3 namespace ipl\Web\Common;
4
5 /**
6 * @method \ipl\Html\Attributes getAttributes()
7 */
8 trait BaseTarget
9 {
10 /**
11 * Get the data-base-target attribute
12 *
13 * @return string|null
14 */
15 public function getBaseTarget(): ?string
16 {
17 /** @var ?string $baseTarget */
18 $baseTarget = $this->getAttributes()->get('data-base-target')->getValue();
19
20 return $baseTarget;
21 }
22
23 /**
24 * Set the data-base-target attribute
25 *
26 * @param string $target
27 *
28 * @return $this
29 */
30 public function setBaseTarget(string $target): self
31 {
32 $this->getAttributes()->set('data-base-target', $target);
33
34 return $this;
35 }
36 }