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

  • AdminDecorator
  • AdminIndexController
  • BlockController
  • BlockDecorator
  • ConfigBlock
  • ConfigController
  • ConfigOperation
  • Core
  • DeleteBlock
  • DeleteController
  • Document
  • DocumentDecorator
  • EditBlock
  • EditController
  • FormBlock
  • Hooks
  • InterlockBlock
  • Kses
  • ManageBlock
  • Module
  • Modules
  • StatsDecorator

Constants

  • OPERATION_SAVE_MODE
  • OPERATION_SAVE_MODE_CONTINUE
  • OPERATION_SAVE_MODE_DISPLAY
  • OPERATION_SAVE_MODE_LIST
  • OPERATION_SAVE_MODE_NEW

Functions

  • slugize
  • start
  • strip_stopwords
 1 <?php
 2 
 3 /*
 4  * This file is part of the Icybee 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;
13 
14 use ICanBoogie\Debug;
15 use ICanBoogie\Operation;
16 use ICanBoogie\Route;
17 
18 use Brickrouge\A;
19 use Brickrouge\Alert;
20 use Brickrouge\DropdownMenu;
21 use Brickrouge\Element;
22 
23 class DocumentDecorator
24 {
25     protected $component;
26 
27     public function __construct($component)
28     {
29         $this->component = $component;
30         $this->body = new Element('body');
31     }
32 
33     public function __toString()
34     {
35         try
36         {
37             return $this->render();
38         }
39         catch (\Exception $e)
40         {
41             return Debug::format_alert($e);
42         }
43     }
44 
45     public function render()
46     {
47         global $core;
48 
49         $component = (string) $this->component;
50         $document = $core->document;
51         $title = \Brickrouge\escape('Icybee');
52         $favicon = Document::resolve_url(\Icybee\ASSETS . 'favicon.png');
53 
54         $body = $this->body;
55         $body[Element::INNER_HTML] = $component . PHP_EOL . PHP_EOL . $document->js;
56 
57         $api_base = '';
58 
59         if (isset($core->site))
60         {
61             $api_base = $core->site->path;
62         }
63 
64         return <<<EOT
65 <!DOCTYPE html>
66 <html lang="{$core->language}" data-api-base="{$api_base}">
67 <head>
68 <meta charset="utf-8" />
69 <title>$title</title>
70 <link rel="shortcut icon" type="image/png" href="{$favicon}" />
71 {$document->css}
72 </head>
73 {$body}
74 </html>
75 EOT;
76     }
77 }
Autodoc API documentation generated by ApiGen 2.8.0