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

  • pApiContentAllocation
  • pApiContentAllocationArticle
  • pApiContentAllocationComplexList
  • pApiContentAllocationSelectBox
  • pApiContentAllocationTreeView
  • pApiTree

Functions

  • pica_ArticleListActions
  • pica_GetCustomTabProperties
  • pica_RegisterCustomTab
  • pica_RenderArticleAction
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the select box class for the plugin content allocation.
 4:  *
 5:  * @package    Plugin
 6:  * @subpackage ContentAllocation
 7:  * @version    SVN Revision $Rev:$
 8:  *
 9:  * @author     Marco Jahn
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: plugin_include('repository', 'custom/FrontendNavigation.php');
19: 
20: /**
21:  * Select box class for content allocation
22:  *
23:  * @package    Plugin
24:  * @subpackage ContentAllocation
25:  */
26: class pApiContentAllocationSelectBox extends pApiTree {
27: 
28:     var $idSetter = true;
29:     var $load = array();
30: 
31:     function pApiContentAllocationComplexList ($uuid) {
32:         global $cfg;
33: 
34:         parent::pApiTree($uuid);
35:     }
36: 
37:     function _buildRenderTree ($tree) {
38:         global $action, $frame, $area, $sess, $idart;
39: 
40:         $oldIdSetter = $this->idSetter;
41:         $this->idSetter = false;
42: 
43:         $result = '';
44: 
45:         $levelElms = sizeof($tree);
46:         $cnt = 1;
47:         foreach ($tree as $item_tmp) {
48:             $item = '';
49: 
50:             $spacer = '|-';
51:             $spacer = str_pad($spacer, (($item_tmp['level'] + 1) * 2), "--", STR_PAD_RIGHT);
52: 
53:             $result .= '<option value="'.$item_tmp['idpica_alloc'].'_'.$item_tmp['level'].'">'.$spacer . $item_tmp['name'].'</option>';
54: 
55:             if ($item_tmp['children']) {
56:                 $children = $this->_buildRenderTree($item_tmp['children']);
57:                 $result .= $children;
58:             }
59:         }
60: 
61:         return $result;
62:     }
63: 
64:     function setChecked($load) {
65:         return false;
66:     }
67: 
68:     /**
69:      *
70:      * @modified 27.10.2005 $bUseTreeStatus = false (ContentAllocation tree in selectbox is always expanded)
71:      */
72:     function renderTree ($return = true, $parentId = false, $bUseTreeStatus = false) {
73: 
74:         $tree = $this->fetchTree($parentId, 0, $bUseTreeStatus);
75: 
76:         if ($tree === false) {
77:             return false;
78:         }
79: 
80:         $tree = $this->_buildRenderTree($tree);
81: 
82:         if ($return === true) {
83:             return $tree;
84:         } else {
85:             echo $tree;
86:         }
87:     }
88: }
89: 
90: ?>
CMS CONTENIDO 4.9.3 API documentation generated by ApiGen 2.8.0