public function getCatalog($force = false)
    {
        if ($this->nb_catalog === null || $force) {
            $this->nb_catalog = null;
            if ($this instanceof CNabuDataObject &&
                !$this->isBuiltIn()
                && $this->isValueNumeric(NABU_CATALOG_FIELD_ID)
            ) {
                $nb_aux_catalog = new CNabuCatalog($this->getValue(NABU_CATALOG_FIELD_ID));
                if ($nb_aux_catalog->isFetched()) {
                    $this->nb_catalog = $nb_aux_catalog;
                }
            }
        }

        return $this->nb_catalog;
    }
public function getCatalog($force = false)
    {
        if ($this->nb_catalog === null || $force) {
            $this->nb_catalog = null;
            if ($this instanceof CNabuDataObject &&
                !$this->isBuiltIn()
                && $this->isValueNumeric(NABU_CATALOG_FIELD_ID)
            ) {
                $nb_aux_catalog = new CNabuCatalog($this->getValue(NABU_CATALOG_FIELD_ID));
                if ($nb_aux_catalog->isFetched()) {
                    $this->nb_catalog = $nb_aux_catalog;
                }
            }
        }

        return $this->nb_catalog;
    }
public function getCatalog ( $ force = false ) { if ( $ this -> nb_catalog === null || $ force ) { $ this -> nb_catalog = null ; if ( $ this instanceof CNabuDataObject && ! $ this -> isBuiltIn ( ) && $ this -> isValueNumeric ( NABU_CATALOG_FIELD_ID ) ) { $ nb_aux_catalog = new CNabuCatalog ( $ this -> getValue ( NABU_CATALOG_FIELD_ID ) ) ; if ( $ nb_aux_catalog -> isFetched ( ) ) { $ this -> nb_catalog = $ nb_aux_catalog ; } } } return $ this -> nb_catalog ; }
Gets the Catalog instance that owns this object.
@param bool $force If true force to reload catalog instance from database.
@return CNabuCatalog Returns the catalog instance if exists or null if not.
Gets the Catalog instance that owns this object .