backend/controllers/MediaController.php
/**
     * Bulk action for Media triggered when button 'Apply' clicked.
     * The action depends on the value of the dropdown next to the button.
     * Only accept POST HTTP method.
     */
Bulk action for Media triggered when button 'Apply' clicked.
The action depends on the value of the dropdown next to the button.
Only accept POST HTTP method.
Bulk action for Media triggered when button ' Apply ' clicked . The action depends on the value of the dropdown next to the button . Only accept POST HTTP method .
public function actionBulkAction()
    {
        if (Yii::$app->request->post('action') == 'delete') {
            foreach (Yii::$app->request->post('ids', []) as $id) {
                $this->getPermission($this->findModel($id));
                $uploadHandler = new MediaUploadHandler(null, false);
                $uploadHandler->delete($id, MediaUploadHandler::NOT_PRINT_RESPONSE);
            }
        }
    }
public function actionBulkAction ( ) { if ( Yii :: $ app -> request -> post ( 'action' ) == 'delete' ) { foreach ( Yii :: $ app -> request -> post ( 'ids' , [ ] ) as $ id ) { $ this -> getPermission ( $ this -> findModel ( $ id ) ) ; $ uploadHandler = new MediaUploadHandler ( null , false ) ; $ uploadHandler -> delete ( $ id , MediaUploadHandler :: NOT_PRINT_RESPONSE ) ; } } }
Bulk action for Media triggered when button 'Apply' clicked.
Bulk action for Media triggered when button ' Apply ' clicked .