예제 #1
0
파일: PathLinks.php 프로젝트: gingerP/shop
 public function render()
 {
     $borderStyle = 'border-bottom-left-none';
     $mainPathDiv = new Div();
     $mainPathDiv->addStyleClass("main-path");
     if (array_key_exists(UrlParameters::PAGE_NAME, $_GET)) {
         $pageName = Utils::getFromGET(UrlParameters::PAGE_NAME);
         /*log::temp('path-link render 1');*/
         if (array_key_exists(UrlParameters::KEY, $_GET)) {
             /*log::temp('path-link render 2');*/
             $navKeys = new DBNavKeyType();
             if ($pageName == UrlParameters::PAGE__SINGLE_ITEM) {
                 /*log::temp('path-link render 3');*/
                 $div = new Div();
                 $div->addStyleClasses(array($borderStyle, "font_arial", "float_left", "path_link_item", "text_non_select", "cursor_pointer"));
                 $div->updateId("path_link");
                 $div->addAttribute(TagLabels::ON_CLICK, Utils::getWindowOnclickValue(URLBuilder::getPathLinkSingleItem()));
                 $div->addChild($navKeys->getNameByKey(Utils::getFromGET(UrlParameters::KEY)) . " стр. " . Utils::getFromGET(UrlParameters::PAGE));
                 $mainPathDiv->addChild($div);
                 $divContainer = new Div();
                 $divContainer->updateId('store_mode_container');
                 $div1 = new Div();
                 $div1->updateId('path_');
                 $divContainer->addChild($div1);
                 $div2 = new Div();
                 $div2->updateId('path__');
                 $divContainer->addChild($div2);
                 $mainPathDiv->addChild($divContainer);
             }
             echo $mainPathDiv->getHtml();
         }
     }
 }