Assigns available event messages to the template and deletes them from the session.

@return void
979104
protected function assignLastEvent()
  {
    $this->tpl->assign("eventMesg", TeamSpeak3_Helper_Uri::getSessParam("_eventmesg"));
    $this->tpl->assign("eventType", TeamSpeak3_Helper_Uri::getSessParam("_eventtype", "user"));

    unset($_SESSION["_eventmesg"]);
    unset($_SESSION["_eventtype"]);
  }
1223790
public function eventBeforeDelete()
    {
        // delete all attached sub blocks
        $this->deleteAllSubBlocks($this->id);
        //save block data for afterDeleteEvent
        $this->_olds = $this->getOldAttributes();
        // verify if the block exists or not
        $class = ($this->block) ? $this->block->getNameForLog() : '[class has been removed from the filesystem]';
        // log event
        Log::add(3, ['tableName' => 'cms_nav_item_page_block_item', 'action' => 'delete', 'row' => $this->id, 'pageTitle' => $this->droppedPageTitle, 'blockName' => $class], 'cms_nav_item_page_block_item', $this->id);
    }
893845
public function deleteTemplateDataAction()
    {
        $translator = $this->getServiceLocator()->get('translator');

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

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

            // get the service for Templates Model & Table
            $templatesModel = $this->getServiceLocator()->get('MelisEngineTableTemplate');
            $templateId = (int) $request->getPost('templateId');

            // make sure our ID is not empty
            if(!empty($templateId))
            {
                $templatesModel->deleteById($templateId);
                $status = true;
                $message = $templateId . ' successfully deleted';
                $textMessage = 'tr_tool_template_fm_delete_content';
            }
        }

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

        $this->getEventManager()->trigger('meliscms_template_delete_end', $this, array_merge($response, array('typeCode' => 'CMS_TEMPLATE_DELETE', 'itemId' => $templateId)));

        return new JsonModel($response);
    }
1071374
protected function removeLaravelCommands(): void
    {
        $devCommands = ['AuthMake', 'ControllerMake', 'MiddlewareMake',
            'NotificationTable', 'ExceptionMake', 'SessionTable',
            'ChannelMake',
            'ConsoleMake',
            'EventGenerate',
            'EventMake',
            'ExceptionMake',
            'FactoryMake',
            'JobMake',
            'ListenerMake',
            'MailMake',
            'MiddlewareMake',
            'ModelMake',
            'NotificationMake',
            'ObserverMake',
            'PolicyMake',
            'ProviderMake',
            'TestMake',
            'RequestMake',
            'ResourceMake',
            'RuleMake',
            'SeederMake',
        ];

        array_map(function ($item) {
            unset($this->devCommands[$item]);
        }, $devCommands);

        $commands = ['Optimize',
            'OptimizeClear', 'ClearResets', 'RouteCache',
            'RouteClear',
            'RouteList', 'Preset', 'ViewCache',
            'ViewClear', 'Serve', 'StorageLink', ];
        array_map(function ($item) {
            unset($this->commands[$item]);
        }, $commands);
    }
986590
public function removeAll()
    {
        /** @var Connection $connection */
        $connection = $this->entityManager->getConnection();

        $isMySQL = $connection->getDriver()->getName() === 'pdo_mysql';
        if ($isMySQL) {
            $connection->query('SET FOREIGN_KEY_CHECKS=0');
        }

        $connection->query("DELETE FROM neos_neos_eventlog_domain_model_event WHERE dtype = 'ttree_contentrepositoryimporter_event'");

        if ($isMySQL) {
            $connection->query('SET FOREIGN_KEY_CHECKS=1');
        }
    }
1347178
private static function addMessages() {
        $out_data = session()->get('output');
        if ($out_data) {
            foreach ($out_data as $data) {
                self::$debugbar['messages']->debug($data);
            }
            session()->delete('output');
        }
    }
285771
protected function clear(): void
    {
        $this->innerHtml = null;
        $this->outerHtml = null;
        $this->text      = null;
        $this->textWithChildren = null;

        if (is_null($this->parent) === false) {
            $this->parent->clear();
        }
    }
51030
public function tearDown()
    {
        foreach ($this->eventSubscriberPlugins as list($plugin, $eventSubscriber)) {
            $this->removeListeners($plugin, $eventSubscriber);
        }
    }
1125209
public function remove($event = null)
    {
        if (!is_null($event)) {
            unset($this->events[$event]);
        }

        $this->events = [];
    }
1083038
public function removeSkipEvents ($event_name_list) {
		foreach ($event_name_list as $event_name) {
			if (isset($this->_skipEvents[$event_name])) {
				unset($this->_skipEvents[$event_name]);
			}
		}
	}
41259
public function removeListeners($eventName = null)
    {
        if (null !== $eventName) {
            $eventName = $this->cleanEventName($eventName);
        }

        if (array_key_exists($eventName, $this->_list)) {
            unset($this->_list[$eventName]);
        } else {
            $this->_list = array();
        }
    }
389340
public function clearMessages()
    {
        $this->errorMessages = [];
        $this->infoMessages = [];
        $this->successMessages = [];
        $this->warningMessages = [];

        return $this;
    }
1037572
public function handleResetFilter()
	{
		/**
		 * Session stuff
		 */
		$this->deleteSessionData('_grid_page');

		if ($this->default_filter_use_on_reset) {
			$this->deleteSessionData('_grid_has_filtered');
		}

		if ($this->default_sort_use_on_reset) {
			$this->deleteSessionData('_grid_has_sorted');
		}

		foreach ($this->getSessionData() as $key => $value) {
			if (!in_array($key, [
				'_grid_per_page',
				'_grid_sort',
				'_grid_page',
				'_grid_has_filtered',
				'_grid_has_sorted',
				'_grid_hidden_columns',
				'_grid_hidden_columns_manipulated',
			], true)) {
				$this->deleteSessionData($key);
			}
		}

		$this->filter = [];

		$this->reloadTheWholeGrid();
	}
892548
protected function deleteModels(): void
    {
        $model = app($this->modelClass);
        // determine if the model uses `SoftDeletes` trait
        $usesSoftDeletes = in_array(SoftDeletes::class, class_uses($model));

        foreach ($model->all() as $value) {
            try {
                if ($usesSoftDeletes) {
                    $value->forceDelete();
                } else {
                    $value->delete();
                }
            } catch (Exception $exception) {
                Log::warning(sprintf('Error during deleting models. Table: %s. Error: %s', $model->getTable(), $exception->getMessage()));
            }
        }
    }
641909
public function preRemove()
    {
        if ($this->lifecycleEventsActive && $this->deleted === false) {
            $this->resourceManager->deleteResource($this);
        }
    }
583038
public function clearMessages()
    {
        if (isset($this->storage[$this->storageKey])) {
            $this->storage[$this->storageKey] = [];
        }

        $this->fromPrevious = [];
        $this->forNow = [];
    }
938522
public static function delete()
    {
        // Loop all arguments
        foreach (func_get_args() as $argument) {

            // Array element
            if (is_array($argument)) {

                // Loop the keys
                foreach ($argument as $key) {

                    // Unset session key
                    unset($_SESSION[(string) $key]);
                }
            } else {

                // Remove from array
                unset($_SESSION[(string) $argument]);
            }
        }
    }