Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
  1: <?php
  2: /**
  3:  * This file contains the menu GUI class.
  4:  *
  5:  * @package          Core
  6:  * @subpackage       GUI
  7:  * @version          SVN Revision $Rev:$
  8:  *
  9:  * @author           Mischa Holz
 10:  * @copyright        four for business AG <www.4fb.de>
 11:  * @license          http://www.contenido.org/license/LIZENZ.txt
 12:  * @link             http://www.4fb.de
 13:  * @link             http://www.contenido.org
 14:  */
 15: 
 16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 17: 
 18: /**
 19:  * Menu GUI class
 20:  *
 21:  * @package    Core
 22:  * @subpackage GUI
 23:  */
 24: class cGuiMenu {
 25: 
 26:     public $link;
 27:     public $title;
 28:     public $tooltips;
 29:     public $caption;
 30:     public $type;
 31:     public $image;
 32:     public $alt;
 33:     public $actions;
 34:     public $imagewidth;
 35:     public $show;
 36:     protected $_marked;
 37: 
 38:     public function __construct() {
 39:         $this->rowmark = true;
 40:         $this->_marked = false;
 41:     }
 42: 
 43:     public function setTitle($item, $title) {
 44:         $this->title[$item] = $title;
 45:     }
 46: 
 47:     public function setTooltip($item, $tooltip) {
 48:         $this->tooltips[$item] = $tooltip;
 49:     }
 50: 
 51:     public function setRowmark($rowmark = true) {
 52:         $this->rowmark = $rowmark;
 53:     }
 54: 
 55:     public function setImage($item, $image, $maxwidth = 0) {
 56:         $show = '';
 57: 
 58:         $this->image[$item] = $image;
 59:         $this->imagewidth[$item] = $maxwidth;
 60:         $this->show[$item] = $show; // TODO: what is this variable supposed to be?
 61:     }
 62: 
 63:     public function setLink($item, $link) {
 64:         $this->link[$item] = $link;
 65:     }
 66: 
 67:     public function setActions($item, $key, $action) {
 68:         $this->actions[$item][$key] = $action;
 69:     }
 70: 
 71:     public function setMarked($item) {
 72:         $this->_marked = $item;
 73:     }
 74: 
 75:     public function render($print = true) {
 76:         global $cfg;
 77: 
 78:         $tpl = new cTemplate;
 79: 
 80:         $tpl->reset();
 81: 
 82:         if (is_array($this->link)) {
 83:             foreach ($this->link as $key => $value) {
 84:                 if ($value != NULL) {
 85:                     if ($this->imagewidth[$key] != 0) {
 86:                         $value->setContent('<img border="0" alt="" src="' . $this->image[$key] . '" width="' . $this->imagewidth[$key] . '">');
 87:                         $img = $value->render();
 88:                     } else {
 89:                         $value->setContent('<img border="0" alt="" src="' . $this->image[$key] . '">');
 90:                         $img = $value->render();
 91:                     }
 92:                     $value->setContent($this->title[$key]);
 93:                     $link = $value->render();
 94:                 } else {
 95:                     $link = $this->title[$key];
 96: 
 97:                     if ($this->image[$key] != "") {
 98:                         if ($this->imagewidth[$key] != 0) {
 99:                             $img = '<img border="0" alt="" src="' . $this->image[$key] . '" width="' . $this->imagewidth[$key] . '">';
100:                         } else {
101:                             $img = '<img border="0" alt="" src="' . $this->image[$key] . '">';
102:                         }
103:                     } else {
104:                         $img = "&nbsp;";
105:                     }
106:                 }
107: 
108:                 $tpl->set('d', 'NAME', $link);
109: 
110:                 if ($this->image[$key] == "") {
111:                     $tpl->set('d', 'ICON', '');
112:                 } else {
113:                     $tpl->set('d', 'ICON', $img);
114:                 }
115: 
116:                 $extra = "";
117:                 if ($this->rowmark == true) {
118:                     $extra .= 'onmouseover="row.over(this)" onmouseout="row.out(this)" onclick="row.click(this)" ';
119:                 }
120:                 if ($this->_marked === $key) {
121:                     $extra .= "id='marked' ";
122:                 }
123:                 if ($this->tooltips[$key] != "") {
124:                     $extra .= "class='tooltip-north' original-title='" . $this->tooltips[$key] . "' ";
125:                 }
126:                 $tpl->set('d', 'EXTRA', $extra);
127: 
128:                 $fullactions = "";
129:                 if (is_array($this->actions[$key])) {
130: 
131:                     $fullactions = '<table border="0"><tr>';
132: 
133:                     foreach ($this->actions[$key] as $key => $singleaction) {
134:                         $fullactions .= '<td nowrap="nowrap">' . $singleaction . '</td>';
135:                     }
136: 
137:                     $fullactions .= '</tr></table>';
138:                 }
139: 
140:                 $tpl->set('d', 'ACTIONS', $fullactions);
141:                 $tpl->next();
142:             }
143:         }
144:         $rendered = $tpl->generate(cRegistry::getBackendPath() . $cfg['path']['templates'] . $cfg['templates']['generic_menu'], true);
145: 
146:         if ($print == true) {
147:             echo $rendered;
148:         } else {
149:             return $rendered;
150:         }
151:     }
152: 
153: }
154: 
155: ?>
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen