public function getSite(CNabuCustomer $nb_customer = null, $force = false)
    {
        if ($nb_customer !== null && ($this->nb_site === null || $force)) {
            $this->nb_site = null;
            if ($this instanceof CNabuDataObject && $this->contains(NABU_SITE_FIELD_ID)) {
                $this->nb_site = $nb_customer->getSite($this);
            }
        }

        return $this->nb_site;
    }
public function getSite(CNabuCustomer $nb_customer = null, $force = false)
    {
        if ($nb_customer !== null && ($this->nb_site === null || $force)) {
            $this->nb_site = null;
            if ($this instanceof CNabuDataObject && $this->contains(NABU_SITE_FIELD_ID)) {
                $this->nb_site = $nb_customer->getSite($this);
            }
        }

        return $this->nb_site;
    }
public function getSite ( CNabuCustomer $ nb_customer = null , $ force = false ) { if ( $ nb_customer !== null && ( $ this -> nb_site === null || $ force ) ) { $ this -> nb_site = null ; if ( $ this instanceof CNabuDataObject && $ this -> contains ( NABU_SITE_FIELD_ID ) ) { $ this -> nb_site = $ nb_customer -> getSite ( $ this ) ; } } return $ this -> nb_site ; }
Gets the Site instance.
@param CNabuCustomer|null $nb_customer If you want to get the Site in safe mode, you need to pass this parameter
to grant the Customer that owns the Site where the Site Map is placed. In any other case, the Site could not be
retrieved.
@param bool $force If true, then tries to reload Site instance from their storage.
@return CNabuSite|null Returns the Site instance if setted or null if not.
Gets the Site instance .