Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • A
  • Actions
  • Alert
  • AlterCSSClassNamesEvent
  • AssetsCollector
  • Button
  • CSSCollector
  • Dataset
  • Date
  • DateRange
  • DateTime
  • Decorator
  • Document
  • DropdownMenu
  • Element
  • File
  • Form
  • Group
  • Helpers
  • HTMLString
  • Iterator
  • JSCollector
  • ListView
  • ListViewColumn
  • Modal
  • Pager
  • Popover
  • PopoverWidget
  • Ranger
  • RecursiveIterator
  • Salutation
  • Searchbox
  • Section
  • SplitButton
  • Text
  • Widget

Interfaces

  • CSSClassNames
  • DecoratorInterface
  • HTMLStringInterface
  • Validator

Traits

  • CSSClassNamesProperty

Exceptions

  • ElementIsEmpty

Functions

  • _array_flatten_callback
  • array_flatten
  • array_insert
  • check_session
  • dump
  • escape
  • escape_all
  • format
  • format_size
  • get_accessible_file
  • get_document
  • normalize
  • render_css_class
  • render_exception
  • retrieve_form
  • retrieve_form_errors
  • shorten
  • stable_sort
  • store_form
  • store_form_errors
  • strip
  • t
 1 <?php
 2 
 3 /*
 4  * This file is part of the Brickrouge package.
 5  *
 6  * (c) Olivier Laviale <olivier.laviale@gmail.com>
 7  *
 8  * For the full copyright and license information, please view the LICENSE
 9  * file that was distributed with this source code.
10  */
11 
12 namespace Brickrouge;
13 
14 use ICanBoogie\I18n;
15 
16 class Section extends Element
17 {
18     const T_PANEL_CLASS = '#form-section-panel-class';
19 
20     protected static $auto_panelname;
21 
22     protected function render_inner_html()
23     {
24         $rc = null;
25         $children = $this->get_ordered_children();
26 
27         foreach ($children as $name => $element)
28         {
29             if (!$element)
30             {
31                 continue;
32             }
33 
34             $context_class = $name ? normalize($name) : ++self::$auto_panelname;
35 
36             $class = 'panel panel-' . $context_class . ' ' . (is_object($element) ? $element[self::T_PANEL_CLASS] : '');
37 
38             $rc .= '<div class="' . rtrim($class) . '">';
39 
40             if (is_object($element))
41             {
42                 $label = I18n\t($element[Form::LABEL]);
43 
44                 if ($label)
45                 {
46                     if ($label{0} == '.')
47                     {
48                         $label = I18n\t(substr($label, 1), array(), array('scope' => 'element.label'));
49                     }
50 
51                     $rc .= '<div class="form-label form-label-' . $context_class . '">';
52                     $rc .= $label;
53 
54                     if ($element[Element::REQUIRED])
55                     {
56                         $rc .= ' <sup>*</sup>';
57                     }
58 
59                     $rc .= '<span class="separator">&nbsp;:</span>';
60 
61                     $rc .= '</div>';
62                 }
63             }
64 
65             $rc .= '<div class="form-element form-element-' . $context_class . '">';
66             $rc .= $element;
67             $rc .= '</div>';
68 
69             $rc .= '</div>';
70         }
71 
72         return $rc;
73     }
74 }
Autodoc API documentation generated by ApiGen 2.8.0