Not so much double quotes for strings (convention).
authorRoland Haeder <roland@mxchange.org>
Tue, 7 Apr 2015 16:46:45 +0000 (18:46 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 7 Apr 2015 16:46:45 +0000 (18:46 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/classes/main/helper/html/links/class_HtmlLinkHelper.php

index e41de2d..5ac067e 100644 (file)
@@ -128,7 +128,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         */
        private function renderLinkContentWithTextExtraContent ($linkText, $linkTitle, $extraContent='') {
                // Construct link content
-               $linkContent = sprintf("<a href=\"%s%s\" title=\"%s\">%s</a>",
+               $linkContent = sprintf('<a href="{?base_url?}/%s%s" title="%s">%s</a>',
                        $this->getLinkBase(),
                        $extraContent,
                        $linkTitle,
@@ -209,7 +209,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @param       $groupCode      Code to open and close groups
         * @return      void
         */
-       public function addLinkGroup ($groupId, $groupText, $groupCode = "div") {
+       public function addLinkGroup ($groupId, $groupText, $groupCode = 'div') {
                // Is a group with that name open?
                if ($this->ifGroupOpenedPreviously()) {
                        // Then close it here
@@ -217,7 +217,8 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
                } // END - if
 
                // Generate the group content
-               $content = sprintf("<{$groupCode} id=\"group_%s_%s\">%s",
+               $content = sprintf('<%s id="group_%s_%s">%s',
+                       $groupCode,
                        $this->getLinkName(),
                        $groupId,
                        $groupText
@@ -237,7 +238,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         * @return      void
         * @throws      NoGroupOpenedException  If no previous group was opened
         */
-       public function addLinkNote ($groupId, $groupNote, $groupCode = "div") {
+       public function addLinkNote ($groupId, $groupNote, $groupCode = 'div') {
                // Check if a previous group was opened
                if ($this->ifGroupOpenedPreviously() === FALSE) {
                        // No group was opened before!
@@ -247,11 +248,12 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
                // Is a previous sub group open?
                if ($this->ifSubGroupOpenedPreviously()) {
                        // Then close it
-                       $this->closePreviousSubGroupByContent("</{$groupCode}>");
+                       $this->closePreviousSubGroupByContent('</' . $groupCode . '>');
                } // END - if
 
                // Generate the group content
-               $content = sprintf("<{$groupCode} id=\"subgroup_%s_%s\">%s",
+               $content = sprintf('<%s id="subgroup_%s_%s">%s',
+                       $groupCode,
                        $this->getLinkName(),
                        $groupId,
                        $groupNote
@@ -308,10 +310,10 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         */
        public function addActionLinkById ($linkAction, $languageId) {
                // Resolve the language string
-               $languageResolvedText = $this->getLanguageInstance()->getMessage("link_" . $languageId . "_text");
+               $languageResolvedText = $this->getLanguageInstance()->getMessage('link_' . $languageId . '_text');
 
                // Resolve the language string
-               $languageResolvedTitle = $this->getLanguageInstance()->getMessage("link_" . $languageId . "_title");
+               $languageResolvedTitle = $this->getLanguageInstance()->getMessage('link_' . $languageId . '_title');
 
                // Add the action link
                $this->addActionLink($linkAction, $languageResolvedText, $languageResolvedTitle);
@@ -326,10 +328,10 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate {
         */
        public function addLinkWithTextById ($languageId) {
                // Resolve the language string
-               $languageResolvedText = $this->getLanguageInstance()->getMessage("link_" . $languageId . "_text");
+               $languageResolvedText = $this->getLanguageInstance()->getMessage('link_' . $languageId . '_text');
 
                // Resolve the language string
-               $languageResolvedTitle = $this->getLanguageInstance()->getMessage("link_" . $languageId . "_title");
+               $languageResolvedTitle = $this->getLanguageInstance()->getMessage('link_' . $languageId . '_title');
 
                // Now add the link
                $linkContent = $this->renderLinkContentWithTextExtraContent($languageResolvedText, $languageResolvedTitle);