Jake Vanderwerf
23 hours ago f4be611c51473359e6d41780f0313c446079e9d3
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
<?php
namespace JVBase\managers\SEO\render\Traits\_Properties;
 
use JVBase\managers\SEO\render\Thing\Organization\Organization;
 
if (!defined('ABSPATH')) {
    exit;
}
trait departmentTrait {
    /**
     * @var Organization A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe.
     */
    protected Organization $department;
 
    public function getDepartment():?Organization
    {
        return $this->department??null;
    }
    public function setDepartment(Organization|array $department):void
    {
        if (is_array($department)){
            $department = Organization::fromArray($department);
        }
        $this->department = $department;
    }
}