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

Classes

  • FrontendLogic
  • frontendlogic_category
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the category frontend logic class.
 4:  *
 5:  * @package Plugin
 6:  * @subpackage FrontendLogic
 7:  * @author Andreas Lindner
 8:  * @copyright four for business AG <www.4fb.de>
 9:  * @license http://www.contenido.org/license/LIZENZ.txt
10:  * @link http://www.4fb.de
11:  * @link http://www.contenido.org
12:  */
13: 
14: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
15: 
16: /**
17:  * Category frontend logic class.
18:  *
19:  * This "plugin" contains but a single class frontendlogic_category which
20:  * extends the core class FrontendLogic. Neither frontendlogic_category nor
21:  * FrontendLogic are used in the whole project and seem to be deprecated. Author
22:  * of frontendlogic_category was Andreas Lindner. The author of FrontendLogic is
23:  * not known.
24:  *
25:  * @package Plugin
26:  * @subpackage FrontendLogic
27:  */
28: class frontendlogic_category extends FrontendLogic {
29: 
30:     /**
31:      * @see FrontendLogic::getFriendlyName()
32:      */
33:     public function getFriendlyName() {
34:         return i18n("Category", "frontendlogic_category");
35:     }
36: 
37:     /**
38:      * @see FrontendLogic::listActions()
39:      */
40:     public function listActions() {
41:         return array(
42:             "access" => i18n("Access category", "frontendlogic_category")
43:         );
44:     }
45: 
46:     /**
47:      * @see FrontendLogic::listItems()
48:      */
49:     public function listItems() {
50:         global $lang, $db, $cfg;
51: 
52:         if (!is_object($db)) {
53:             $db = cRegistry::getDb();
54:         }
55: 
56:         $sSQL = "SELECT
57:                    b.idcatlang,
58:                    b.name,
59:                    c.level
60:                  FROM
61:                    " . $cfg['tab']['cat'] . " AS a,
62:                    " . $cfg['tab']['cat_lang'] . " AS b,
63:                    " . $cfg['tab']['cat_tree'] . " AS c
64:                  WHERE
65:                    a.idcat = b.idcat AND
66:                    a.idcat = c.idcat AND
67:                    b.idlang = " . $lang . " AND
68:                    b.public = 0
69:                  ORDER BY c.idtree ASC";
70: 
71:         $db->query($sSQL);
72:         while ($db->nextRecord()) {
73:             $items[$db->f("idcatlang")] = '<span style="padding-left: ' . ($db->f("level") * 10) . 'px;">' . htmldecode($db->f("name")) . '</span>';
74:         }
75: 
76:         return $items;
77:     }
78: }
79: 
80: ?>
CMS CONTENIDO 4.9.11 API documentation generated by ApiGen 2.8.0