model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
return the static model class
 public function actionDelete($itemId)
 {
     /*
      * We make sure to not allow deleting directly with the URL, user must come from the commondrugs list page
      */
     if (!Yii::app()->request->isAjaxRequest) {
         $this->render('errorpage', array('errorMessage' => 'notajaxcall'));
     } else {
         if ($leafletSubspecialy = OphTrConsent_Leaflet_Subspecialty::model()->findByPk($itemId)) {
             $leafletSubspecialy->delete();
             echo 'success';
         } else {
             $this->render('errorpage', array('errormessage' => 'recordmissing'));
         }
     }
 }
 /**
  * @param $itemId
  */
 public function actionDeleteSubspecialty($itemId)
 {
     /*
      * We make sure to not allow deleting directly with the URL, user must come from the commondrugs list page
      */
     if (!Yii::app()->request->isAjaxRequest) {
         $this->render("errorpage", array("errorMessage" => "notajaxcall"));
     } else {
         $this->deleteItem($itemId, OphTrConsent_Leaflet_Subspecialty::model());
     }
 }