Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • 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

Classes

  • ArticleForumRightBottom
  • cApiClickableAction
  • cApiClickableQuestionAction
  • cGuiBackendHelpbox
  • cGuiFoldingRow
  • cGuiList
  • cGuiMenu
  • cGuiNavigation
  • cGuiNotification
  • cGuiObjectPager
  • cGuiPage
  • cGuiScrollList
  • cGuiTableForm
  • cGuiTree
  • cPager
  • cTemplate
  • cTree
  • cTreeItem
  • NoteLink
  • NoteList
  • NoteListItem
  • NoteView
  • TODOBackendList
  • TODOLink
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the list GUI class.
 4:  *
 5:  * @package          Core
 6:  * @subpackage       GUI
 7:  * @version          SVN Revision $Rev:$
 8:  *
 9:  * @author           Timo Hummel
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:  * List GUI class
20:  *
21:  * @package    Core
22:  * @subpackage GUI
23:  */
24: class cGuiList {
25: 
26:     protected $cells;
27: 
28:     public function __construct() {
29:         $this->cells = array();
30:     }
31: 
32:     public function setCell($item, $cell, $value) {
33:         $this->cells[$item][$cell] = $value;
34:     }
35: 
36:     public function render($print = false) {
37:         global $cfg;
38: 
39:         $backendPath = cRegistry::getBackendPath();
40: 
41:         $tpl = new cTemplate();
42:         $tpl2 = new cTemplate();
43: 
44:         $colcount = 0;
45: 
46:         if (is_array($this->cells)) {
47:             foreach ($this->cells as $row => $cells) {
48:                 $thefont = '';
49:                 $unne = '';
50: 
51:                 $colcount++;
52: 
53:                 $content = "";
54:                 $count = 0;
55: 
56:                 foreach ($cells as $key => $value) {
57:                     $count++;
58:                     $tpl2->reset();
59: 
60:                     $tpl2->set('s', 'CONTENT', $value);
61:                     if ($colcount == 1) {
62:                         $content .= $tpl2->generate($backendPath . $cfg['path']['templates'] . $cfg['templates']['generic_list_head'], true);
63:                     } else {
64:                         $content .= $tpl2->generate($backendPath . $cfg['path']['templates'] . $cfg['templates']['generic_list_row'], true);
65:                     }
66:                 }
67: 
68:                 $tpl->set('d', 'ROWS', $content);
69:                 $tpl->next();
70:             }
71:         }
72: 
73:         $rendered = $tpl->generate($backendPath . $cfg['path']['templates'] . $cfg['templates']['generic_list'], true);
74: 
75:         if ($print == true) {
76:             echo $rendered;
77:         } else {
78:             return $rendered;
79:         }
80:     }
81: 
82: }
83: 
84: ?>
CMS CONTENIDO 4.9.1 API documentation generated by ApiGen 2.8.0