| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | namespace Atk4\Data\Model; |
| 6: | |
| 7: | trait JoinLinkTrait |
| 8: | { |
| 9: | protected ?string $joinName = null; |
| 10: | |
| 11: | public function hasJoin(): bool |
| 12: | { |
| 13: | return $this->joinName !== null; |
| 14: | } |
| 15: | |
| 16: | public function getJoin(): Join |
| 17: | { |
| 18: | return $this->getOwner()->getJoin($this->joinName); |
| 19: | } |
| 20: | } |
| 21: |