backend/controllers/MediaController.php
/**
     * Deletes an existing Media model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     *
     * @param integer $id
     * @return mixed
     * @throws ForbiddenHttpException
     * @throws NotFoundHttpException
     */
Deletes an existing Media model.
If deletion is successful, the browser will be redirected to the 'index' page.

@param integer $id
@return mixed
@throws ForbiddenHttpException
@throws NotFoundHttpException
Deletes an existing Media model . If deletion is successful the browser will be redirected to the ' index ' page . @param integer $id @return mixed @throws ForbiddenHttpException @throws NotFoundHttpException
public function actionDelete($id)
    {
        $this->getPermission($this->findModel($id));
        $uploadHandler = new MediaUploadHandler(null, false);
        $uploadHandler->delete($id, MediaUploadHandler::NOT_PRINT_RESPONSE);
        return $this->redirect(['index']);
    }
public function actionDelete ( $ id ) { $ this -> getPermission ( $ this -> findModel ( $ id ) ) ; $ uploadHandler = new MediaUploadHandler ( null , false ) ; $ uploadHandler -> delete ( $ id , MediaUploadHandler :: NOT_PRINT_RESPONSE ) ; return $ this -> redirect ( [ 'index' ] ) ; }
Deletes an existing Media model.
Deletes an existing Media model .