本文整理汇总了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();
}
示例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();
}
示例3: process
public function process()
{
if (!$this->isProcessed()) {
if ($this->getParent() instanceof ListgroupElement) {
$this->addClass('list-group-item');
}
}
return parent::process();
}
示例4: process
public function process()
{
if (!$this->isProcessed()) {
if ($this->getParent() instanceof Media\ListElement) {
$this->setTagName('LI');
}
}
return parent::process();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}