public function existsModel($uid, $allowHidden = false)
    {
        $model = $this->find($uid);

        if ($model->isGhost()) {
            $this->load($model);
        }

        return $model->isLoaded() && (!$model->isHidden() || $allowHidden);
    }
public function existsModel($uid, $allowHidden = false)
    {
        $model = $this->find($uid);

        if ($model->isGhost()) {
            $this->load($model);
        }

        return $model->isLoaded() && (!$model->isHidden() || $allowHidden);
    }
public function existsModel ( $ uid , $ allowHidden = false ) { $ model = $ this -> find ( $ uid ) ; if ( $ model -> isGhost ( ) ) { $ this -> load ( $ model ) ; } return $ model -> isLoaded ( ) && ( ! $ model -> isHidden ( ) || $ allowHidden ) ; }
Checks whether a model with a certain UID actually exists in the database
and could be loaded.

@param int $uid
the UID of the record to retrieve, must be > 0
@param bool $allowHidden
whether hidden records should be allowed to be retrieved

@return bool TRUE if a model with the UID $uid exists in the database,
FALSE otherwise
Checks whether a model with a certain UID actually exists in the database and could be loaded .