Add some suffix to the current URL.

@param AddToUrlEvent $event The event.

@return void
356939
public function handleAddToUrl(AddToUrlEvent $event)
    {
        /** @var Frontend $frontendAdapter */
        $frontendAdapter = $this->framework->getAdapter(Frontend::class);

        $event->setUrl($frontendAdapter->addToUrl($event->getSuffix(), $event->isIgnoreParams()));
    }
1155047
private static String addSuffix(final String href, final String suffix) {
        final int idx = href.lastIndexOf(".");
        return idx != -1
                ? (href.substring(0, idx) + suffix + href.substring(idx))
                : (href + suffix);
    }
580156
public function handlePersistUpdateUrl(PersistEvent $event)
    {
        $document = $event->getDocument();

        if (!$document instanceof ShadowLocaleBehavior) {
            return;
        }

        if (!$document->isShadowLocaleEnabled()) {
            return;
        }

        $node = $event->getNode();
        $structure = $this->inspector->getStructureMetadata($document);

        if (false === $structure->hasPropertyWithTagName('sulu.rlp')) {
            return;
        }

        $locatorProperty = $structure->getPropertyByTagName('sulu.rlp');

        if ($node->getPropertyValueWithDefault(
            $this->encoder->localizedSystemName(
                $locatorProperty->getName(), $document->getLocale()
            ),
            null
        )) {
            return;
        }

        $shadowLocator = $node->getPropertyValueWithDefault(
            $this->encoder->localizedSystemName(
                $locatorProperty->getName(), $document->getShadowLocale()
            ),
            null
        );

        if (!$shadowLocator) {
            return;
        }

        $event->getAccessor()->set(
          'resourceSegment',
          $shadowLocator
        );
    }
21622
public function onAfterRouting(Event $event)
    {
        $tmpl = <<<TMPL
{
    "registrar": [
        {
            "language": "php",
            "provider": "routing",
            "signature": [
                "Windwalker\\\\Core\\\\Router\\\\RouteBuilderTrait:to",
                "Windwalker\\\\Core\\\\Router\\\\RouteBuilderTrait:route",
                "Windwalker\\\\Core\\\\Router\\\\RouteBuilderTrait:generate",
                "Windwalker\\\\Core\\\\Router\\\\RouteBuilderTrait:fullRoute",
                "Windwalker\\\\Core\\\\Router\\\\RouteBuilderTrait:rawRoute",
                "Windwalker\\\\Core\\\\Router\\\\CoreRouter:to",
                "Windwalker\\\\Core\\\\Router\\\\CoreRouter:route",
                "Windwalker\\\\Core\\\\Router\\\\CoreRouter:generate",
                "Windwalker\\\\Core\\\\Router\\\\CoreRouter:fullRoute",
                "Windwalker\\\\Core\\\\Router\\\\CoreRouter:rawRoute"
            ]
        }
    ],
    "providers": [
        {
            "name": "routing",
            "lookup_strings": [
                %s
            ]
        }
    ]
}
TMPL;

        /** @var MainRouter $router */
        $router = $event['router'];

        $names = [];
        $routes = $router->getRoutes();

        foreach ($routes as $route) {
            $name = $route->getName();
            
            list($pkg, $name) = array_pad(explode('@', $name), -2, null);
            
            $names[] = StringHelper::quote($name, '"');
            
            if ($pkg) {
                $names[] = StringHelper::quote($pkg . '@' . $name, '"');
            }
        }
        
        $names = implode(",\r\n", $names);
        $content = sprintf($tmpl, $names);

        File::write(WINDWALKER_TEMP . '/ide/router/.ide-toolbox.metadata.json', $content);
    }
1267912
private static URI addSuffix(final URI href, final String suffix) {
        return URI.create(addSuffix(href.toString(), suffix));
    }
641521
public function onInitIPAddress($event)
    {
        $sender = $event->sender;
        $request = $sender->getWebRequest();
        if ($sender->enableIP && $request && empty($sender->ipAddress)) {
            $sender->ipAddress = $request->userIP;
        }
    }
1179279
public function addGlobal(Event $event)
    {
        $menuTemplate = $this->menuBuilder->getBottomRightNavbar()->getChild('menu.template');

        $menuTemplate->addChild('menu.template.new', [
            'route'          => 'victoire_template_new',
            'linkAttributes' => [
                'class' => 'v-drop__anchor',
            ],
        ])->setLinkAttribute('data-toggle', 'vic-modal');

        $menuTemplate->addChild('menu.template.index', [
            'route'          => 'victoire_template_index',
            'linkAttributes' => [
                'class' => 'v-drop__anchor',
            ],
        ])->setLinkAttribute('data-toggle', 'vic-modal');
    }
15505
public function onNick(Event $event)
    {
        $msg = $event->getMessage();

        $oldNick = $msg['nick'];
        $newNick = $msg['params']['nickname'];

        $this->storage->updateNickname($oldNick, $newNick);
    }
85211
public function setEvent($event)
  {
    if ($event === '?' || $event === '') {
      $this->event = null;
    } else {
      $event = Util::foreignLettersToEnglishLetters($event);
      $event = Util::titleCaseIfCurrentlyAllCaps($event);
      $this->event = $event === '?' ? null : $event;
    }
  }
780613
function _remove_url_suffix()
	{
		if  ($this->config->item('url_suffix') != "")
		{
			$this->uri_string = preg_replace("|".preg_quote($this->config->item('url_suffix'))."$|", "", $this->uri_string);
		}
	}
857105
public function beforeSend($event = null)
    {
        if (isset($this->stream)) {
            return;
        }
        if (isset($this->controller) && $this->task) {
            if ($this->isInstructable) {
                $this->format = static::FORMAT_JSON;
                $this->data = $this->generateInstructions();
            } else {
                $this->handleFlashStatus();
                if ($this->redirect) {
                    $this->redirect($this->redirect);
                } elseif ($this->refresh) {
                    $this->refresh();
                } else {
                    if (is_null($this->content)) {
                        $this->content = $this->renderContent(true);
                    }
                }
            }
        }
    }
505107
public function addGlobal(Event $event)
    {
        $topNavbar = $this->menuBuilder->getTopNavbar();

        $topNavbar
            ->addChild('menu.sitemap', [
                'route' => 'victoire_sitemap_reorganize',
            ])
            ->setLinkAttribute('data-toggle', 'vic-modal');
    }
136644
public function setVersionMixin(AbstractMappingEvent $event)
    {
        if (!$this->support($event->getDocument())) {
            return;
        }

        $event->getNode()->addMixin('mix:versionable');
    }
300432
public function addPrefix(RouteEvent $event)
    {
        $route = $event->getRoute();

        $route->setPath($this->prefix . $route->getPath());
    }
687934
public function onRender(HomepageRenderEvent $event)
    {
        $services = $this->serviceManager->getServices();
        foreach ($services as $service) {
            $event->addRoute($service['$ref'], $service['profile']);
        }
    }
369797
public function addContextual($event)
    {
        $page = $event->getPage();
        $currentArticle = $event->getPage()->getBusinessEntity();

        $bottomRightNavbar = $this->menuBuilder->getBottomRightNavbar();

        $bottomRightNavbar->addChild('menu.page.settings',
            [
                'route'           => 'victoire_blog_article_settings',
                'routeParameters' => [
                    'id'      => $currentArticle->getId(),
                    'page_id' => $page->getId(),
                ],
                'linkAttributes' => [
                    'class' => 'v-btn v-btn--sm v-btn--transparent',
                    'id'    => 'v-settings-link',
                ],
            ]
        )->setLinkAttribute('data-toggle', 'vic-modal');
    }
1248461
public function addEvent($event, $eventParams)
    {
        // check if valid rule usage for object_type_id
        $this->validateRule("Events", $event);
        // get required parameters for specific rule
        $requiredParams = Events::GetRequiredParams($event);
        // checking for missing and invalid types for each parameter
        $check_params = $this->_checkParams($requiredParams, $eventParams);
        // if no missing or invalid rule parameters
        if ($check_params)
        {
            $value = $this->_formatParams($eventParams);
            $rule = $event . "(" . $value . ")";
            $this->_events[] = $rule;

            return $this->_events;
        }
        return false;
    }