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

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

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