Handle the event.

@param  PublishThePost $event
@return void
328181
public function handle(PublishThePost $event) {

        $status = "Article: ";
        $status .= $event->data['id']['title'];
        $status .= " ";
        $status .= $event->data['id']['canonical_url'];
        $status .= " #Laravel";

        $twitter_status = Twitter::postTweet(['status' => $status, 'format' => 'json']);
        \Log::info('Lasallecms\Lasallecmsapi\Listeners\SendTweetAboutPost listener completed');
    }
249959
public function handle(EventInterface $event)
    {

        try {
            // load the application server instance
            /** @var \AppserverIo\Psr\ApplicationServer\ApplicationServerInterface $applicationServer */
            $applicationServer = $this->getApplicationServer();

            // write a log message that the event has been invoked
            $applicationServer->getSystemLogger()->info($event->getName());

            // load the service instance and switch the umask
            /** @var \AppserverIo\Appserver\Core\Api\DeploymentService $service */
            $service = $applicationServer->newService('AppserverIo\Appserver\Core\Api\DeploymentService');
            $service->initUmask($applicationServer->getSystemConfiguration()->getUmask());

        } catch (\Exception $e) {
            $applicationServer->getSystemLogger()->error($e->__toString());
        }
    }
355319
public function handle(GetResponseEvent $event): void
    {
        if ($this->isEnabled() && $this->hasRole() && $this->isAnonymous()) {
            $this->sidManager->addSpecialRole($this->config['role']);
        }
    }
179651
protected void handlePostEvent()
    {
        EntityMetadata metadata = getEntityMetadata();
        if (!kunderaQuery.isDeleteUpdate())
        {
            persistenceDelegeator.getEventDispatcher().fireEventListeners(metadata, null, PostLoad.class);
        }
    }
1214871
public function onEvent(Event $event = null)
    {
        while (!empty($this->messages)) {
            $message = array_shift($this->messages);

            $this->handle($message, $this->dispatcher);
        }
    }
234296
private function fireEvent($event, ...$params)
    {
        if (!$this->eventManager) {
            return;
        }

        $this->eventManager->handle($event, ...$params);
    }
730731
public function handlePublishPageNumber(PublishEvent $event)
    {
        $document = $event->getDocument();
        $node = $event->getNode();
        $propertyName = $this->propertyEncoder->systemName(static::FIELD);
        if (!$document instanceof PageBehavior) {
            return;
        }

        $node->setProperty($propertyName, $document->getPageNumber());
    }
830481
protected function fireEvent($event)
    {
        $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]);
    }
501165
private void onMessageSent(MessageSentEvent event) {
        handler.post(() -> listener.onMessageSent(event));
        log("Event published " + event.toString());
    }
649650
public function handle(JobPushed $event)
    {
        $this->jobs->pushed(
            $event->connectionName, $event->queue, $event->payload
        );
    }
269824
public function handle(BroadcastSubscriptionEvent $event): void
    {
        $this->broadcaster->broadcast(
            $event->subscription,
            $event->fieldName,
            $event->root
        );
    }
1156793
public function handleForItemRendering(ParseItemEvent $event): void
    {
        $settings = $event->getRenderSettings();
        if (!$settings->get(self::FRONTEND_EDITING_ENABLED_FLAG)) {
            return;
        }

        $parsed          = $event->getResult();
        $item            = $event->getItem();
        $tableName       = $item->getMetaModel()->getTableName();
        $definition      = $this->frontendEditor->createDcGeneral($tableName)->getDataDefinition();
        $basicDefinition = $definition->getBasicDefinition();
        $editingPage     = $settings->get(self::FRONTEND_EDITING_PAGE);
        $modelId         = ModelId::fromValues($tableName, $item->get('id'))->getSerialized();

        // Add edit action
        if ($basicDefinition->isEditable()) {
            $parsed['actions']['edit'] = [
                'label' => $this->translateLabel('metamodel_edit_item', $definition->getName()),
                'href'  => $this->generateEditUrl($editingPage, $modelId),
                'class' => 'edit',
            ];
        }

        // Add copy action
        if ($basicDefinition->isCreatable()) {
            $parsed['actions']['copy'] = [
                'label' => $this->translateLabel('metamodel_copy_item', $definition->getName()),
                'href'  => $this->generateCopyUrl($editingPage, $modelId),
                'class' => 'copy',
            ];
        }

        // Add create variant action
        if (false === $item->isVariant() && $basicDefinition->isCreatable() && $item->getMetaModel()->hasVariants()) {
            $parsed['actions']['createvariant'] = [
                'label' => $this->translateLabel('metamodel_create_variant', $definition->getName()),
                'href'  => $this->generateCreateVariantUrl($editingPage, $modelId),
                'class' => 'createvariant',
            ];
        }

        // Add delete action
        if ($basicDefinition->isDeletable()) {
            $parsed['actions']['delete'] = [
                'label'     => $this->translateLabel('metamodel_delete_item', $definition->getName()),
                'href'      => $this->generateDeleteUrl($editingPage, $modelId),
                'attribute' => sprintf(
                    'onclick="if (!confirm(\'%s\')) return false;"',
                    $this->translator->trans('MSC.deleteConfirm', [$item->get('id')], 'contao_default')
                ),
                'class'     => 'delete',
            ];
        }

        $event->setResult($parsed);
    }
438005
public function publishChildren(PublishEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticleDocument) {
            return;
        }

        $children = iterator_to_array($document->getChildren());
        foreach ($children as $child) {
            if (LocalizationState::GHOST !== $this->documentInspector->getLocalizationState($child)) {
                $this->documentManager->publish($child, $event->getLocale());
            }
        }
    }
1293842
public function handle(Event $event)
    {
        $name = $event->getName();
        $emitter = $event->getEmitter();
        $emitter->removeListener($name, $this);

        unset($name, $emitter);

        call_user_func_array($this->handler, [$event]);
    }
49109
protected function handle($event): void
    {
        $method = $this->getApplyMethod($event);

        if (!method_exists($this, $method)) {
            return;
        }

        $this->$method($event);
    }
375875
public function handle(EventInterface $event)
    {

        try {
            // load the application server instance
            /** @var \AppserverIo\Psr\ApplicationServer\ApplicationServerInterface $applicationServer */
            $applicationServer = $this->getApplicationServer();

            // write a log message that the event has been invoked
            $applicationServer->getSystemLogger()->info($event->getName());

            // and initialize a console for each node found in the configuration
            /** @var \AppserverIo\Psr\Cli\Configuration\ConsoleConfigurationInterface $consoleNode */
            foreach ($applicationServer->getSystemConfiguration()->getConsoles() as $consoleNode) {
                /** @var \AppserverIo\Appserver\Core\Interfaces\ConsoleFactoryInterface $consoleFactory */
                $consoleFactory = $consoleNode->getFactory();

                // use the factory if available
                /** @var \AppserverIo\Appserver\Core\Interfaces\ConsoleInterface $console */
                $console = $consoleFactory::factory($applicationServer, $consoleNode);

                // register the console as service
                $applicationServer->bindService(ApplicationServerInterface::ADMINISTRATION, $console);
            }

        } catch (\Exception $e) {
            $applicationServer->getSystemLogger()->error($e->__toString());
        }
    }
867152
public function handle()
    {
        $publishes = ServiceProvider::pathsToPublish('LaravelModule\ServiceProvider', null);
        foreach ($publishes as $from => $to) {
            $this->publishItem($from, $to);
        }
        $this->info('Publishing complete.');
    }