X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fhelper%2Fhtml%2Flinks%2Fclass_HtmlLinkHelper.php;h=170a309231c21ae1ef78a3bc3dff51877b952e15;hp=77b98aea4f40ec0a80bf8d64199368c892eacd79;hb=HEAD;hpb=3ed365cb1808ac8a228da18241e789866f419178 diff --git a/framework/main/classes/helper/html/links/class_HtmlLinkHelper.php b/framework/main/classes/helper/html/links/class_HtmlLinkHelper.php index 77b98aea..170a3092 100644 --- a/framework/main/classes/helper/html/links/class_HtmlLinkHelper.php +++ b/framework/main/classes/helper/html/links/class_HtmlLinkHelper.php @@ -9,8 +9,7 @@ use Org\Mxchange\CoreFramework\Configuration\NoConfigEntryException; use Org\Mxchange\CoreFramework\Generic\NullPointerException; use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper; use Org\Mxchange\CoreFramework\Helper\Template\HelpableTemplate; -use Org\Mxchange\CoreFramework\Registry\GenericRegistry; -use Org\Mxchange\CoreFramework\Utils\String\StringUtils; +use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils; use Org\Mxchange\CoreFramework\Template\CompileableTemplate; /** @@ -18,7 +17,7 @@ use Org\Mxchange\CoreFramework\Template\CompileableTemplate; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -94,8 +93,8 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate { // Sanity-check on it if (is_null($requestInstance)) { // Throw an exception here - throw new NullPointerException($helperInstance, self::EXCEPTION_IS_NULL_POINTER); - } // END - if + throw new NullPointerException($helperInstance, FrameworkInterface::EXCEPTION_IS_NULL_POINTER); + } // Get page (this will throw an exception if not set) $command = StringUtils::convertDashesToUnderscores($requestInstance->getRequestElement('command')); @@ -107,7 +106,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate { if (!is_null($linkBase)) { // Then output a deprecation message $helperInstance->deprecationWarning('[' . __METHOD__ . ':' . __LINE__ . ']: linkBase is deprecated. Please remove it from your templates and add a config entry ' . $configEntry . ' in your config.php file.'); - } // END - if + } // Determine link base from config now and 'command' request try { @@ -118,7 +117,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate { if (is_null($linkBase)) { // Then throw again the exception throw new NoConfigEntryException(array(__CLASS__, ($configEntry)), FrameworkConfiguration::EXCEPTION_CONFIG_ENTRY_WAS_NOT_FOUND); - } // END - if + } } // Set link base @@ -202,7 +201,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate { if ($this->ifGroupOpenedPreviously()) { // Then close it $this->closePreviousGroupByContent(''); - } // END - if + } // Get the content $content = $this->renderContent(); @@ -228,7 +227,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate { if ($this->ifGroupOpenedPreviously()) { // Then close it here $this->closePreviousGroupByContent(''); - } // END - if + } // Generate the group content $content = sprintf('<%s id="group_%s_%s">%s', @@ -257,13 +256,13 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate { if ($this->ifGroupOpenedPreviously() === false) { // No group was opened before! throw new NoGroupOpenedException(array($this, $groupNote), self::EXCEPTION_GROUP_NOT_OPENED); - } // END - if + } // Is a previous sub group open? if ($this->ifSubGroupOpenedPreviously()) { // Then close it $this->closePreviousSubGroupByContent(''); - } // END - if + } // Generate the group content $content = sprintf('<%s id="subgroup_%s_%s">%s', @@ -290,7 +289,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate { if ($this->ifGroupOpenedPreviously() === false) { // No group was opened before! throw new NoGroupOpenedException(array($this, $linkAction . '(' . $linkText . ')'), self::EXCEPTION_GROUP_NOT_OPENED); - } // END - if + } // Default parameter SEPARATOR is & $separator = self::EXTRA_PARAMETER_SEPARATOR; @@ -300,7 +299,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate { if (count($linkArray) == 0) { // No question mark $separator = self::FIRST_PARAMETER_SEPARATOR; - } // END - if + } // Prepare action $action = sprintf('%saction=%s',