protected function execDeleteBulk()
    {
        //get values
        $primaryKeyValues = $_POST['primaryKeyValues'];
        // database translations
        $this->loadTranslations('database', sprintf('private/global/locales/%s/database.ini', LANGUAGE));
        $deletedNumber = 0;
        foreach($primaryKeyValues as $recordPrimaryKeyValues) {
            try{
                $this->delete($recordPrimaryKeyValues);
                $deletedNumber++;
            } catch(\PDOException $exception) {
                $this->messages->save('cookies', 'danger', $this->handleError($exception));
            }
        }
        //success message
        if($deletedNumber) {
            $this->messages->save('cookies','success',sprintf($this->translations[$this->name]['CRUD']['delete-bulk-success'], $deletedNumber, $this->translations[$this->name]['plural']));
        }
        //redirection to list action is performed by javascript into jquery post() success function
    }
protected function execDeleteBulk()
    {
        //get values
        $primaryKeyValues = $_POST['primaryKeyValues'];
        // database translations
        $this->loadTranslations('database', sprintf('private/global/locales/%s/database.ini', LANGUAGE));
        $deletedNumber = 0;
        foreach($primaryKeyValues as $recordPrimaryKeyValues) {
            try{
                $this->delete($recordPrimaryKeyValues);
                $deletedNumber++;
            } catch(\PDOException $exception) {
                $this->messages->save('cookies', 'danger', $this->handleError($exception));
            }
        }
        //success message
        if($deletedNumber) {
            $this->messages->save('cookies','success',sprintf($this->translations[$this->name]['CRUD']['delete-bulk-success'], $deletedNumber, $this->translations[$this->name]['plural']));
        }
        //redirection to list action is performed by javascript into jquery post() success function
    }
protected function execDeleteBulk ( ) { //get values $ primaryKeyValues = $ _POST [ 'primaryKeyValues' ] ; // database translations $ this -> loadTranslations ( 'database' , sprintf ( 'private/global/locales/%s/database.ini' , LANGUAGE ) ) ; $ deletedNumber = 0 ; foreach ( $ primaryKeyValues as $ recordPrimaryKeyValues ) { try { $ this -> delete ( $ recordPrimaryKeyValues ) ; $ deletedNumber ++ ; } catch ( \ PDOException $ exception ) { $ this -> messages -> save ( 'cookies' , 'danger' , $ this -> handleError ( $ exception ) ) ; } } //success message if ( $ deletedNumber ) { $ this -> messages -> save ( 'cookies' , 'success' , sprintf ( $ this -> translations [ $ this -> name ] [ 'CRUD' ] [ 'delete-bulk-success' ] , $ deletedNumber , $ this -> translations [ $ this -> name ] [ 'plural' ] ) ) ; } //redirection to list action is performed by javascript into jquery post() success function }
deletes multiple record
deletes multiple record