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

  • 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:  * @version SVN Revision $Rev:$
 8:  *
 9:  * @author Andreas Lindner
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:  * Category frontend logic class.
20:  *
21:  * This "plugin" contains but a single class frontendlogic_category which
22:  * extends the core class FrontendLogic. Neither frontendlogic_category nor
23:  * FrontendLogic are used in the whole project and seem to be deprecated. Author
24:  * of frontendlogic_category was Andreas Lindner. The author of FrontendLogic is
25:  * not known.
26:  *
27:  * @package Plugin
28:  * @subpackage FrontendLogic
29:  */
30: class frontendlogic_category extends FrontendLogic {
31: 
32:     /**
33:      * @see FrontendLogic::getFriendlyName()
34:      */
35:     public function getFriendlyName() {
36:         return i18n("Category", "frontendlogic_category");
37:     }
38: 
39:     /**
40:      * @see FrontendLogic::listActions()
41:      */
42:     public function listActions() {
43:         return array(
44:             "access" => i18n("Access category", "frontendlogic_category")
45:         );
46:     }
47: 
48:     /**
49:      * @see FrontendLogic::listItems()
50:      */
51:     public function listItems() {
52:         global $lang, $db, $cfg;
53: 
54:         if (!is_object($db)) {
55:             $db = cRegistry::getDb();
56:         }
57: 
58:         $sSQL = "SELECT
59:                    b.idcatlang,
60:                    b.name,
61:                    c.level
62:                  FROM
63:                    " . $cfg['tab']['cat'] . " AS a,
64:                    " . $cfg['tab']['cat_lang'] . " AS b,
65:                    " . $cfg['tab']['cat_tree'] . " AS c
66:                  WHERE
67:                    a.idcat = b.idcat AND
68:                    a.idcat = c.idcat AND
69:                    b.idlang = " . $lang . " AND
70:                    b.public = 0
71:                  ORDER BY c.idtree ASC";
72: 
73:         $db->query($sSQL);
74:         while ($db->nextRecord()) {
75:             $items[$db->f("idcatlang")] = '<span style="padding-left: ' . ($db->f("level") * 10) . 'px;">' . htmldecode($db->f("name")) . '</span>';
76:         }
77: 
78:         return $items;
79:     }
80: }
81: 
82: ?>
CMS CONTENIDO 4.9.3 API documentation generated by ApiGen 2.8.0