Remove event
@return JsonModel
546926
public function removeAction()
    {
        $success = 0;
        $message = 'tr_melis_cms_prospects_theme_item_delete_failed';
        $errors  = [];
        $title   = 'tr_melis_cms_prospects_theme_items';
        $request = $this->getRequest();
        $id      = null;

        if($request->isPost()) {
            $itemId = $request->getPost('itemId');
            
            $this->themeItemTable()->deleteById($itemId);
            $this->themeItemTransTable()->deleteByField('item_trans_theme_item_id', $itemId);
            
            $checkData = $this->themeItemTable()->getEntryById($itemId)->toArray();
            
            if(empty($checkData)) {
               
                $success = 1;
                $message = 'tr_melis_cms_prospects_theme_item_delete_success';
            }

        }

        $response = [
            'success'     => $success,
            'errors'      => $errors,
            'textMessage' => $this->tool()->getTranslation($message),
            'textTitle'   => $this->tool()->getTranslation($title)
        ];

        $this->getEventManager()->trigger('meliscmsprospects_theme_delete_end', $this, array_merge($response, array('typeCode' => 'CMS_PROSPECTS_THEME_DELETE', 'itemId' => $id)));

        return new JsonModel($response);
    }
1136024
public function deleteEventAction(){
        $translator = $this->getServiceLocator()->get('translator');
        
        $request = $this->getRequest();
        // Default Values
        $id = null;
        $status  = 0;
        $textMessage = '';
        $errors  = array();
        $textMessage = '';
        $textTitle = '';
         
        if($request->isPost()) {
             
            $postValues = get_object_vars($request->getPost());
             
            if (!empty($postValues)){
                 
                $calendarService = $this->getServiceLocator()->get('MelisCalendarService');
                $id = $responseData = $calendarService->deleteCalendarEvent($postValues);
                if (!is_null($id)){
                    $textMessage = 'tr_melistoolcalendar_delete_event_success';
                    $status  = 1;
                }else{
                    $textMessage = 'tr_melistoolcalendar_delete_event_unable';
                }
            }
        }
         
        $response = array(
            'success' => $status,
            'textTitle' => 'tr_melistoolcalendar_delete_event_title',
            'textMessage' => $textMessage,
            'errors' => $errors,
        );
        
        if ($status){
            $this->getEventManager()->trigger('meliscalendar_save_event_end', $this, array_merge($response, array('typeCode' => 'CALENDAR_EVENT_DELETE', 'itemId' => $id)));
        }
         
        return new JsonModel($response);
    }
646263
public function purge()
    {
        if ($this->eventDispatcher) {
            $purgeEvent = new PurgeEvent($this->queue);

            $this->eventDispatcher->dispatch(PurgeEvent::NAME, $purgeEvent);
        }

        return $this->call($this->queue, 'purge');
    }
90933
public static function deleteMapping()
    {
        $instance = new static;

        $params = $instance->getBasicEsParams();

        return $instance->getElasticSearchClient()->indices()->deleteMapping($params);
    }
1142081
public function ackAction()
    {
        $json = array();
        $postId = $this->params()->fromQuery('postid', null);
        $response = $this->mattermost->saveReaction($postId, 'ok');
        $json['result'] = $response;
        return new JsonModel($json);
    }
402353
protected function performDeleteOnModel()
    {
        if ($this->forceDeleting) {
            return $this->newQueryWithoutScopes()->where($this->getKeyName(), $this->getKey())->forceDelete();
        }

        return $this->runSoftDelete();
    }
1136885
public function melisCoreGdprDeleteSelectedAction()
    {
        $request = $this->getRequest();
        $success = 0;

        if ($request->isPost()) {
            $idsToBeDeleted = get_object_vars($request->getPost());

            $melisCoreGdprService = $this->getServiceLocator()->get('MelisCoreGdprService');
            $finalData = $melisCoreGdprService->deleteSelected($idsToBeDeleted);
            $success = 1;

            foreach ($finalData as $key => $value) {
                if (!$value) {
                    $success = 0;
                }
            }
        }

        return new JsonModel ([
            'success' =>  $success,
        ]);
    }
934115
protected function performDeleteOnModel()
    {
        if ($this->forceDeleting) {
            $this->exists = false;

            return $this->setKeysForSaveQuery($this->newModelQuery())->forceDelete();
        }

        return $this->runSoftDelete();
    }
1234390
public function delete() : Model
	{
		$builder = $this->queryBuilder();

		if (isset($this->softProperties[$this->key])) {
			$builder->where(
				$this->key, $this->softProperties[$this->key]
			);
		}

		$builder->delete($this->getAssociatedTable());

		return $this;
	}
1245451
public function cancel()
    {
        $this->client->performHttpCallToFullUrl(
            MollieApiClient::HTTP_DELETE,
            $this->_links->self->href
        );

        return null;
    }
742810
public T remove() {
        EventImpl event = (EventImpl) CurrentEvent.get();
        if (null != event) {
            // Also need to remove name, if specified, from the Event's Set.
            if (name != null) {
                event.removeEventLocalName(name);
            }
            return event.remove(this);
        }
        return null;
    }
454106
public function deletePlatformIdAction(){
        $translator = $this->getServiceLocator()->get('translator');
        $this->getEventManager()->trigger('meliscms_platform_IDs_delete_start', $this, array());
        $request = $this->getRequest();
        $datas = get_object_vars($request->getPost());
        
        $pids_id = (int) $datas['pid_id'];
        $melisEngineTablePlatformIds = $this->getServiceLocator()->get('MelisEngineTablePlatformIds');
        $melisEngineTablePlatformIds->deleteById($pids_id);
        
        $response = array(
            'success' => 1,
            'textTitle' => 'tr_meliscms_tool_platform_ids',
            'textMessage' => 'tr_meliscms_tool_platform_ids_delete_success_msg',
        );
        $this->getEventManager()->trigger('meliscms_platform_IDs_delete_end', $this, array_merge($response, array('typeCode' => 'CMS_PLATFORM_IDS_DELETE', 'itemId' => $pids_id)));
        return new JsonModel($response);
    }
1147951
public function deleteAction()
    {
        $themeId = $this->getEvent()->getRouteMatch()->getParam('themeId');
        $theme = $this->getAdminThemeService()->findById($themeId);
        $title = $theme->getTitle();
        $this->getAdminThemeService()->remove($theme);
        $this->flashMessenger()->addMessage('The theme "'.$title.'"has been deleted');

        return $this->redirect()->toRoute('admin/playgrounddesign_themeadmin');
    }
990747
protected function getDeleteEvent()
    {
        $event = new IndexEngineIndexEvent();

        $event->setId($this->getRequest()->request->get("index_engine_index_id"));

        return $event;
    }
1332997
public static function remove() {
		if(self::$entity_manager == null)
			self::initialize();

		return call_user_func_array(array(self::$entity_manager, "remove"), func_get_args());
	}
947800
public function destroy($id)
    {
        $record = $this->modelRepository->findOrFail($id);

        if ( ! $this->isModelDeletable($record)) {
            return $this->failureResponse(
                $this->getLastUnmetDeleteConditionMessage()
            );
        }

        event( new Events\DeletingModelInCms($record) );

        if ( ! $this->deleteModel($record)) {
            // @codeCoverageIgnoreStart
            return $this->failureResponse(
                cms_trans('models.delete.failure.unknown')
            );
            // @codeCoverageIgnoreEnd
        }

        event( new Events\ModelDeletedInCms($this->getModelInformation()->modelClass(), $id) );

        if (request()->ajax()) {
            return response()->json([
                'success' => true,
            ]);
        }

        cms_flash(
            cms_trans(
                'models.delete.success-message',
                [ 'record' => $this->getSimpleRecordReference($id, $record) ]
            ),
            FlashLevel::SUCCESS
        );

        return redirect()->back();
    }
449773
public function deleteStyleAction()
    {
        $translator = $this->getServiceLocator()->get('translator');

        $eventDatas = array();
        $this->getEventManager()->trigger('meliscms_style_delete_start', $this, $eventDatas);

        $request = $this->getRequest();
        $templateId = null;
        $status  = 0;
        $message = 'no data';
        $textMessage = 'tr_meliscms_tool_styles_delete_fail';
        $textTitle = 'tr_meliscms_tool_styles';
        // make sure it's a POST call
        if($request->isPost()) {

            // get the service for Templates Model & Table
            $tableStyle = $this->getServiceLocator()->get('MelisEngineTableStyle');
            $styleId = (int) $request->getPost('styleId');

            // make sure our ID is not empty
            if(!empty($styleId))
            {
                $tableStyle->deleteById($styleId);
                $status = 1;
                $textMessage = 'tr_meliscms_tool_styles_delete_success';
            }
        }

        $response = array(
            'success' => $status ,
            'textTitle' => $textTitle,
            'textMessage' => $textMessage
        );

        $this->getEventManager()->trigger('meliscms_style_delete_end', $this, array_merge($response, array('typeCode' => 'CMS_STYLE_DELETE', 'itemId' => $styleId)));

        return new JsonModel($response);
    }