OphTrConsent_Leaflet_Subspecialty::model PHP Метод

model() публичный статический Метод

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
Результат the static model class
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

 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'));
         }
     }
 }
All Usage Examples Of OphTrConsent_Leaflet_Subspecialty::model