backend/controllers/MediaController.php
/**
     * Delete Media model and its files based on media primary key.
     *
     * @param $id
     * @return array
     * @throws ForbiddenHttpException
     * @throws NotFoundHttpException
     */
Delete Media model and its files based on media primary key.
@param $id
@return array
@throws ForbiddenHttpException
@throws NotFoundHttpException
Delete Media model and its files based on media primary key . @param $id @return array @throws ForbiddenHttpException @throws NotFoundHttpException
public function actionAjaxDelete($id)
    {
        $this->getPermission($this->findModel($id));
        $uploadHandler = new MediaUploadHandler(null, MediaUploadHandler::NOT_PRINT_RESPONSE);
        $uploadHandler->delete($id);
    }
public function actionAjaxDelete ( $ id ) { $ this -> getPermission ( $ this -> findModel ( $ id ) ) ; $ uploadHandler = new MediaUploadHandler ( null , MediaUploadHandler :: NOT_PRINT_RESPONSE ) ; $ uploadHandler -> delete ( $ id ) ; }
Delete Media model and its files based on media primary key.
Delete Media model and its files based on media primary key .