public function existsTemplate($templateId) { // try and fetch the record try { $this->getTemplate($templateId); } catch (Exception $e) { return false; } // if we made it here, the record exists return true; }