/** * Get page record by UUID * @param MongoId $id attribute "_id" for collection "page" * @param Boolean $isFinished attribute "isFinished" for collection "page" * @return integer the number of documents updated, should be 1 for success or 0 for fail. * @author Vincent Hou */ public static function getPage($id, $isPreview) { return $isPreview ? parent::findByPk($id) : parent::findByPk($id, ['isFinished' => true]); }