public function setSite(CNabuSite $nb_site = null, $field = NABU_SITE_FIELD_ID)
    {
        $this->nb_site = $nb_site;
        if ($this instanceof CNabuDataObject) {
            $this->transferValue($nb_site, $field);
        }

        return $this;
    }
public function setSite(CNabuSite $nb_site = null, $field = NABU_SITE_FIELD_ID)
    {
        $this->nb_site = $nb_site;
        if ($this instanceof CNabuDataObject) {
            $this->transferValue($nb_site, $field);
        }

        return $this;
    }
public function setSite ( CNabuSite $ nb_site = null , $ field = NABU_SITE_FIELD_ID ) { $ this -> nb_site = $ nb_site ; if ( $ this instanceof CNabuDataObject ) { $ this -> transferValue ( $ nb_site , $ field ) ; } return $ this ; }
Sets the Site instance that owns this object and sets the field containing the site id.
@param CNabuSite|null $nb_site Site instance to be setted.
@param string $field Field name where the site id will be stored.
@return CNabuDataObject Returns $this to allow the cascade chain of setters.
Sets the Site instance that owns this object and sets the field containing the site id .