当前位置: 首页>>代码示例>>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;未经允许,请勿转载。