ImageToGallery::model PHP Méthode

model() public static méthode

Returns the static model of the specified AR class.
public static model ( string $className = __CLASS__ ) : ImageToGallery
$className string
Résultat ImageToGallery the static model class
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

Exemple #1
0
 public function actionDeleteImage($id)
 {
     if (Yii::app()->request->isPostRequest) {
         ImageToGallery::model()->findByPk((int) $id)->delete();
         if (!isset($_GET['ajax'])) {
             $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
         }
     } else {
         throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
     }
 }
All Usage Examples Of ImageToGallery::model