當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Element::process方法代碼示例

本文整理匯總了PHP中Element::process方法的典型用法代碼示例。如果您正苦於以下問題:PHP Element::process方法的具體用法?PHP Element::process怎麽用?PHP Element::process使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Element的用法示例。


在下文中一共展示了Element::process方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->getParent() instanceof MediaElement) {
             $this->setTagName('DIV');
             $this->addClass('media-body');
         }
         if ($this->getParent()->hasClass('modal-content')) {
             $this->setTagName('DIV');
             $this->addClass('modal-body');
         }
         if ($this->getParent() instanceof TabElement) {
             $tabs = $this->findParent('UL');
             $this->setTagName('DIV');
             if ($tabs instanceof TabsElement) {
                 $id = 'xtpl-boostrap-tab-' . $this->getParent()->getAttribute('NAME');
                 $this->setAttribute('ID', $id);
                 $this->addClass('tab-pane');
                 if ($this->getParent()->hasClass('active')) {
                     $this->addClass('active');
                 }
                 if ($tabs->hasClass('fade')) {
                     $this->addClass('fade');
                     if ($this->hasClass('active')) {
                         $this->addClass('in');
                     }
                 }
                 $ce = $tabs->getContentElement();
                 $ce->addChild($this);
             }
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:34,代碼來源:BodyElement.php

示例2: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->getParent() instanceof DropdownElement) {
             $this->setTagName('LI');
             $this->addClass('dropdown-header');
         }
         if ($this->getParent() instanceof NavbarElement) {
             $this->addClass('navbar-header');
         }
         if ($this->getParent()->hasClass('media-body')) {
             $size = 4;
             if ($this->hasAttribute('SIZE')) {
                 $this->ignoreAttribute('SIZE');
                 $size = intval($this->getAttribute('SIZE'));
             }
             $this->setTagName("H{$size}");
             $this->addClass('media-heading');
         }
         if ($this->getParent()->hasClass('list-group-item')) {
             $size = 4;
             if ($this->hasAttribute('SIZE')) {
                 $this->ignoreAttribute('SIZE');
                 $size = intval($this->getAttribute('SIZE'));
             }
             $this->setTagName("H{$size}");
             $this->addClass('list-group-item-heading');
         }
         if ($this->getParent()->hasClass('modal-content')) {
             $this->addClass('modal-header');
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:34,代碼來源:HeaderElement.php

示例3: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->getParent() instanceof ListgroupElement) {
             $this->addClass('list-group-item');
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:9,代碼來源:LiElement.php

示例4: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->getParent() instanceof Media\ListElement) {
             $this->setTagName('LI');
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:9,代碼來源:MediaElement.php

示例5: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->getParent() instanceof PanelElement) {
             $this->addClass('panel-footer');
         }
         if ($this->getParent()->hasClass('modal-content')) {
             $this->addClass('modal-footer');
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:12,代碼來源:FooterElement.php

示例6: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if (($this->getParent() instanceof HeaderElement || $this->getParent() instanceof FooterElement) && $this->getParent(2) instanceof PanelElement) {
             $size = 4;
             if ($this->hasAttribute('SIZE')) {
                 $this->ignoreAttribute('SIZE');
                 $size = intval($this->getAttribute('SIZE'));
             }
             $this->setTagName("H{$size}");
             $this->addClass('panel-title');
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:15,代碼來源:TitleElement.php

示例7: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->getParent() instanceof PElement && $this->getParent()->hasClass('navbar-text')) {
             $this->addClass('navbar-link');
         }
         if ($this->getParent() instanceof AlertElement) {
             $this->addClass('alert-link');
         }
         if ($this->getParent() instanceof ListgroupElement) {
             $this->addClass('list-group-item');
             $this->getParent()->setTagName('DIV');
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:16,代碼來源:AElement.php

示例8: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->hasAttribute('TYPE')) {
             switch ($this->getAttribute('TYPE')) {
                 case 'inline':
                     $labels = $this->find('LABEL');
                     foreach ($labels as $label) {
                         $label->addClass('radio-inline');
                     }
                     $this->display = false;
                     break;
             }
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:17,代碼來源:RadioElement.php

示例9: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->getParent() instanceof NavbarElement || ($this->getParent() instanceof CollapseElement || $this->getParent() instanceof HeaderElement) && $this->getParent()->getParent() instanceof NavbarElement) {
             $this->addClass('navbar-form');
             if ($this->hasAttribute('ALIGN')) {
                 $this->ignoreAttribute('ALIGN');
                 switch ($this->getAttribute('ALIGN')) {
                     case 'left':
                         $this->addClass('navbar-left');
                         break;
                     case 'right':
                         $this->addClass('navbar-right');
                 }
             }
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:19,代碼來源:FormElement.php

示例10: process

 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->getParent() instanceof Input\GroupElement) {
             $span = new SpanElement(array('CLASS' => 'input-group-btn'));
             $this->getParent()->insertBefore($this, $span);
             $span->addChild($this);
         }
         if ($this->getParent() instanceof NavbarElement || ($this->getParent() instanceof CollapseElement || $this->getParent() instanceof HeaderElement) && $this->getParent()->getParent() instanceof NavbarElement) {
             $this->addClass('navbar-btn');
             if ($this->hasAttribute('ALIGN')) {
                 $this->ignoreAttribute('ALIGN');
                 switch ($this->getAttribute('ALIGN')) {
                     case 'left':
                         $this->addClass('navbar-left');
                         break;
                     case 'right':
                         $this->addClass('navbar-right');
                 }
             }
         }
     }
     return parent::process();
 }
開發者ID:torbenkoehn,項目名稱:php-xtpl,代碼行數:24,代碼來源:ButtonElement.php


注:本文中的Element::process方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。