confirm destroy of the specified resource from storage.

@param \Laralum\Events\Models\Event $event

@return \Illuminate\Http\Response
193479
public function confirmDestroy(Request $request, Event $event)
    {
        $this->authorize('delete', $event);

        return view('laralum::pages.confirmation', [
            'method'  => 'DELETE',
            'message' => __('laralum_events::general.sure_del_event', ['event' => $event->title]),
            'action'  => route('laralum::events.destroy', ['event' => $event->id]),
        ]);
    }
515490
public function destroy(Event $event, EventTicket $eventTicket)
    {
        $event->tickets()->where($eventTicket->getKeyName(), $eventTicket->getKey())->first()->delete();

        return intend([
            'url' => route('adminarea.events.tickets.index', ['event' => $event]),
            'with' => ['warning' => trans('cortex/foundation::messages.resource_deleted', ['resource' => trans('cortex/bookings::common.event_ticket'), 'identifier' => $eventTicket->name])],
        ]);
    }
146960
protected function handleEvent($event)
    {
        if (!is_null($response = $this->call('event.*', array($event)))) {
            return $response;
        }

        $event['Event'] = strtolower($event['Event']);

        return $this->call("event.{$event['Event']}", array($event));
    }
930675
public function handle(EventMessage $event)
    {
        if ($event instanceof \PAMI\Message\Event\AsyncAGIEvent) {
            if ($event->getCommandId() == $this->lastCommandId) {
                $this->lastAgiResult = trim($event->getResult());
            }
        }
    }
981939
public static function onAfterRemove(Event $event)
    {
        $layout = $event->getTarget();
        if (!is_a($layout, 'BackBee\Site\Layout')) {
            return;
        }

        $dispatcher = $event->getDispatcher();
        if (null !== $dispatcher->getApplication()) {
            $dispatcher->getApplication()->getEntityManager()
                    ->getRepository('BackBee\Site\Layout')
                    ->removeThumbnail($layout, $dispatcher->getApplication());
        }

        $dispatcher->getApplication()->getRenderer()->removeLayout($layout);
    }
998897
public function fireEvent($event)
    {
        $handle = $this->getQualifiedEvent($event);

        // Fire the event
        /** @var \League\Event\EventInterface $event */
        $event = $this->explainer->displayBelow(function () use ($handle) {
            return $this->events->emit($handle, [$this]);
        });

        // If the event returned a strict false, halt the task
        $wasHalted = $event && $event->isPropagationStopped();
        if ($wasHalted && $event !== 'halt' && method_exists($this, 'halt')) {
            $this->halt();
        }

        return !$wasHalted;
    }
1018481
protected static function delete_event( stdClass $event ) {
		$crons = _get_cron_array();

		if ( ! isset( $crons[ $event->time ][ $event->hook ][ $event->sig ] ) ) {
			return false;
		}

		wp_unschedule_event( $event->time, $event->hook, $event->args );
		return true;
	}
989884
public static function clearCache(Event $event)
    {
        $options = self::getOptions($event);
        $binDir = $options['symfony-bin-dir'];

        $opcode = '';
        if (array_key_exists('accelerator-cache-opcode', $options)) {
            $opcode .= ' --opcode';
        }

        $user = '';
        if (array_key_exists('accelerator-cache-user', $options)) {
            $user .= ' --user';
        }

        $cli = '';
        if (array_key_exists('accelerator-cache-cli', $options)) {
            $cli .= ' --cli';
        }

        $auth = '';
        if (array_key_exists('accelerator-cache-auth', $options)) {
            $auth .= ' --auth '.escapeshellarg($options['accelerator-cache-auth']);
        }

        try {
            static::executeCommand($event, $binDir, 'cache:accelerator:clear'.$opcode.$user.$cli.$auth, $options['process-timeout']);
        } catch (\RuntimeException $e) {
            $event->getIO()->write('<error>'.$e->getMessage().'</error>');
        }
    }
260700
public static function off($event)
    {
        if (static::bound($event)) {
            unset(
                static::$events[$event],
                static::$events['__bow.transmission.event'][$event],
                static::$events['__bow.once.event'][$event]
            );
        }
    }
804075
protected function handle(Event $event)
    {
        $method = $this->getApplyMethod($event);
        if (!method_exists($this, $method)) {
            return;
        }
        $this->$method($event);
    }
964015
public function destroy(Event $event, Media $media)
    {
        $event->media()->where($media->getKeyName(), $media->getKey())->first()->delete();

        return intend([
            'url' => route('adminarea.events.media.index', ['event' => $event]),
            'with' => ['warning' => trans('cortex/foundation::messages.resource_deleted', ['resource' => trans('cortex/foundation::common.media'), 'identifier' => $media->getRouteKey()])],
        ]);
    }
1320392
public function signRequest(Event $event) {
        $command = $event['command'];

        switch ($command->getName()) {
            case 'AddImage':
            case 'DeleteImage':
            case 'ReplaceMetadata':
            case 'EditMetadata':
            case 'DeleteMetadata':
            case 'GenerateShortUrl':
            case 'EditResourceGroup':
            case 'DeleteResourceGroup':
            case 'EditPublicKey':
            case 'DeletePublicKey':
            case 'AddAccessControlRules':
            case 'DeleteAccessControlRule':
                // Add the auth headers
                $this->addAuthenticationHeaders($command->getRequest());
                break;
        }
    }
120259
public function deleteImage(EventInterface $event) {
        $event->getManager()->trigger('db.image.delete');
        $event->getManager()->trigger('storage.image.delete');

        $model = new Model\ArrayModel();
        $model->setData([
            'imageIdentifier' => $event->getRequest()->getImageIdentifier(),
        ]);

        $event->getResponse()->setModel($model);
    }
489769
public function off(string $event)
    {
        if (false === ($key = array_search($event, $this->getSupportedEvents(), true))) {
            return null;
        }

        if (!isset($this->eventHandlers[$key]) || !($cb = $this->eventHandlers[$key])) {
            return null;
        }

        $this->eventHandlers[$key] = null;

        return $cb;
    }
642813
public function off($event)
    {
        $event = $this->getEventName($event);

        if ($this->hasListener($event)) {
            unset($this->sortedListeners[$event], $this->listeners[$event]);
        }

        unset($event);
    }
913257
public function respond(Event $event)
    {
        $key = $event->getSubject()->success ? 'success' : 'error';
        $apiConfig = $this->_action()->getConfig('api.' . $key);

        if (isset($apiConfig['exception'])) {
            $this->_exceptionResponse($event, $apiConfig['exception']);

            return null;
        }

        $response = $this->render($event->getSubject());

        if (empty($apiConfig['code'])) {
            return $response;
        }

        return $response->withStatus($apiConfig['code']);
    }
70076
public static function clearCache(Event $event)
    {
        // to avoid errors due to the encrypted container forcibly clean the cache directory
        $dir = self::getRootDir().'cache/prod';
        if (is_dir($dir)) {
            (new Filesystem())->remove($dir);
        }

        self::executeCommand('cache:clear --no-warmup --env=prod --no-debug', $event->getIO());
        self::executeCommand('cache:clear --no-warmup --env=dev --no-debug', $event->getIO());
    }