PHP Classes

File: view/melis-cms/sites-domains/render-tool-sites-domains-content.phtml

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis CMS   view/melis-cms/sites-domains/render-tool-sites-domains-content.phtml   Download  
File: view/melis-cms/sites-domains/render-tool-sites-domains-content.phtml
Role: Example script
Content type: text/plain
Description: Example script
Class: Melis CMS
Content management system that provides its tools
Author: By
Last change:
Date: 1 year ago
Size: 5,306 bytes
 

Contents

Class file image Download
<?php
$id
= '';
if (!empty(
$this->zoneconfig['conf']['id']))
   
$id = ' id="' . $this->siteId . '_' . $this->zoneconfig['conf']['id'] . '"';

$data_melisKey = $this->melisKey;

?>
<?php
if(!empty($this->siteId)) { ?>
<div data-melisKey='<?= $data_melisKey; ?>'<?= $id; ?> class="tab-pane widget-body-regular meliscms_center_tabs">
    <div class="widget widget-tabs widget-tabs-double widget-tabs-responsive margin-none border-none">
        <div class="widget-body innerAll inner-2x">
            <div class="tab-header-title-container">
                <div class="row">
                    <div class="col-md-12">
                        <h3 class="float-left"><?= $this->translate('tr_melis_cms_sites_domains'); ?></h3>
                    </div>
                </div>
            </div>
            <div class="tab-pane active">
                <div class="row">
                    <div class="col-xs-12 col-md-2">
                        <div class="product-text-tab-container">
                            <ul class="nav-tabs product-text-tab meliscms-site-domains-list">
                                <?php foreach($this->siteEnvs as $idx => $siteEnv) :?>
<li class="">
                                        <a class="clearfix" data-toggle="tab" id="news_cms_lang_<?= $siteEnv['plf_id'] ?>" href="#<?= $siteEnv['plf_name']; ?>-log-type-details-<?= $this->siteId; ?>" aria-expanded="true" data-env-id="<?= $siteEnv['plf_id'] ?>">
                                            <span><?= $siteEnv['plf_name'] ?></span>
                                        </a>
                                    </li>
                                <?php endforeach; ?>
</ul>
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-5">
                        <div class="tab-content">
                            <?php foreach ($this->siteEnvs as $idx => $siteEnv) : ?>
<div id="<?= $siteEnv['plf_name']; ?>-log-type-details-<?= $this->siteId; ?>" class="tab-pane product-text-tab-content">
                                    <div class="bg-white">
                                        <h4 class=""><i class="fa fa-map-marker"></i> <?= $siteEnv['plf_name']; ?></h4>
                                    </div>
                                    <div id="cms_domain_<?= $siteEnv['plf_id']; ?>">
                                        <?php
                                        $form
= clone $this->domainsForm;

                                        if (isset(
$this->siteDomains) && !empty($this->siteDomains)) {
                                            foreach (
$this->siteDomains as $siteDomain) {
                                                if (
$siteDomain['sdom_env'] == $siteEnv['plf_name']) {
                                                    foreach (
$form->getElements() as $element => $attributes) {
                                                       
$el = $form->get((string) $element);
                                                        if ( isset(
$siteDomain[$el->getName()])) {
                                                           
$el->setValue($siteDomain[$el->getName()]);
                                                        }
                                                    }
                                                }
                                            }
                                        }

                                        foreach (
$form->getElements() as $element => $attributes) {
                                           
$el = $form->get((string) $element);

                                            if (
$el->getName() == 'sdom_env')
                                               
$el->setValue($siteEnv['plf_name']);

                                            if (
$el->getName() == 'sdom_site_id')
                                               
$el->setValue($this->siteId);

                                           
// Only display the asterisk on the current platform
                                           
if ($el->getName() == 'sdom_scheme' || $el->getName('sdom_domain')) {
                                                if (
$siteEnv['plf_name'] != getenv('MELIS_PLATFORM')) {
                                                   
$el->setAttribute('required', '');
                                                }
                                            }

                                           
$el->setName($siteEnv['plf_name']."_".$el->getName());
                                           
$el->setAttribute('id', $el->getName());
                                        }

                                        echo
$this->form()->openTag($form);
                                        echo
$this->melisFieldCollection($form);
                                        echo
$this->form()->closeTag();
                                       
?>
</div>
                                </div>
                            <?php endforeach; ?>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php } ?>