PHP Classes

File: view/melis-cms/language/render-tool-language-modal.phtml

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis CMS   view/melis-cms/language/render-tool-language-modal.phtml   Download  
File: view/melis-cms/language/render-tool-language-modal.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: 1,754 bytes
 

Contents

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

    <!-- MODAL WITH TABS -->
    <?php

   
/*
     * Next, we need to setup your modal if you want to put some specific actions to your tool, in order to display the modal
     * we can simply use the Melis Modal Helper
     */
   
    // setup your modal, here you need to put up modal unique identifer, this will be used when invoking your modal
   
$this->melisModal()->setModalId('modal-language-cms');
   
   
// we need to put some contents to your modal, since you have already configured this in the app.tools.php, we can simply call
   
if(!empty($this->zoneconfig['interface'])) {
        foreach(
$this->zoneconfig['interface'] as $keyConfig => $menuConfig) {
            echo
$this->$keyConfig;
        }
       
// this is to avoid modal showing all contents of the tabs in one tab, this happens when reloading the zone of the tool
       
$this->melisModal()->setActiveTab('id_meliscms_tool_language_modal_content_new');
    }
    elseif(
count($this->zoneconfig['interface']) < 1) {
       
// prompt user with an empty modal
       
$this->melisModal()->setTabs($this->emptyModal);
    }
   
   
// tell the modal now to show the close button in the bottom of the modal box
   
$this->melisModal()->hasCloseButton(false);
   
// or you can disregard that function, if you don't want to have a close button your modal.
   
    // modal has been setup, time to display it on our view file, this will only show once invoked
   
echo $this->melisModal()->renderModal();

   
?>
<!-- END MODAL WITH TABS -->
</div>