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

  • CoreConfigRequirement
  • DatabaseForm
  • DatabaseOperation
  • DocumentDecorator
  • InstallForm
  • InstallOperation
  • InstallRequirements
  • LanguageElement
  • Operation
  • PanelDecorator
  • PanelForm
  • PDODriversRequirement
  • RepositoryRequirement
  • Requirement
  • Requirements
  • RequirementsOperation
  • SiteForm
  • SiteOperation
  • StepsController
  • TellMeMore
  • UserConfigRequirement
  • UserForm
  • UserOperation
  • WelcomePanel
  • WelcomeRequirements

Functions

  • t
  1 <?php
  2 
  3 /*
  4  * This file is part of the Icybee/Installer 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 Icybee\Installer;
 13 
 14 use Brickrouge\Element;
 15 
 16 /**
 17  * Decorates the component with an HTML document.
 18  */
 19 class DocumentDecorator
 20 {
 21     protected $component;
 22 
 23     public function __construct($component)
 24     {
 25         $this->component = $component;
 26     }
 27 
 28     public function render()
 29     {
 30         global $core;
 31 
 32         $component = (string) $this->component;
 33 
 34         $document = $core->document;
 35         $document->css->add(\Brickrouge\ASSETS . 'brickrouge.css', -100);
 36         $document->css->add(\Icybee\ASSETS . 'admin.css', -100);
 37         $document->css->add(\Icybee\ASSETS . 'admin-more.css', -100);
 38         $document->css->add(ASSETS . 'page.css');
 39 
 40         $document->js->add(\Icybee\ASSETS . 'mootools.js', -100);
 41         $document->js->add(\ICanBoogie\ASSETS . 'icanboogie.js', -100);
 42         $document->js->add(\Brickrouge\ASSETS . 'brickrouge.js', -100);
 43         $document->js->add(ASSETS . 'page.js');
 44 
 45         $title = t('document_title');
 46 
 47         $hl = new Element
 48         (
 49             'select', array
 50             (
 51                 Element::OPTIONS => array
 52                 (
 53                     'en' => 'English',
 54                     'fr' => 'Français'
 55                 ),
 56 
 57                 'class' => 'span2',
 58                 'value' => $core->language,
 59                 'id' => 'hl'
 60             )
 61         );
 62 
 63         return <<<EOT
 64 <!DOCTYPE html>
 65 <html lang="{$core->language}">
 66 <head>
 67 <meta charset="utf-8">
 68 <title>{$title}</title>
 69 {$document->css}
 70 </head>
 71 <body id="installer">
 72 
 73     <div id="quick">
 74         <div class="pull-left">
 75             <div class="btn-group">Icybee</div>
 76         </div>
 77     </div>
 78 
 79     <div class="actionbar">
 80         <div class="actionbar-title">
 81             <h1>{$title}</h1>
 82         </div>
 83 
 84         <div class="pull-right">$hl</div>
 85     </div>
 86 
 87     <div class="container">
 88         {$component}
 89     </div>
 90 
 91 {$document->js}
 92 </body>
 93 </html>
 94 EOT;
 95     }
 96 
 97     public function __toString()
 98     {
 99         try
100         {
101             return (string) $this->render();
102         }
103         catch (\Exception $e)
104         {
105             return \Brickrouge\render_exception($e);
106         }
107     }
108 }
Autodoc API documentation generated by ApiGen 2.8.0