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

  • CollectItemsEvent
 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\Element;
13 
14 use Brickrouge\Element;
15 use Brickrouge\ElementIsEmpty;
16 
17 class ActionbarContextual extends Element
18 {
19     public function __construct(array $attributes=array())
20     {
21         parent::__construct('div', $attributes + array('class' => 'actionbar-contextual'));
22     }
23 
24     protected function render_inner_html()
25     {
26         $items = array();
27 
28         new ActionbarContextual\CollectItemsEvent($this, $items);
29 
30         $html = implode($items);
31 
32         if (empty($html))
33         {
34             throw new ElementIsEmpty;
35         }
36 
37         return $html;
38     }
39 }
40 
41 namespace Icybee\Element\ActionbarContextual;
42 
43 /**
44  * Event class for the `Icybee\Element\ActionbarContextual::collect_items` event.
45  */
46 class CollectItemsEvent extends \ICanBoogie\Event
47 {
48     /**
49      * Reference to the rendered inner HTML of the element.
50      *
51      * @var string
52      */
53     public $items;
54 
55     /**
56      * The event is constructed with the type `collect_items`.
57      *
58      * @param \Icybee\Element\ActionbarSearch $target
59      * @param array $payload
60      */
61     public function __construct(\Icybee\Element\ActionbarContextual $target, array &$items)
62     {
63         $this->items = &$items;
64 
65         parent::__construct($target, 'collect_items');
66     }
67 }
Autodoc API documentation generated by ApiGen 2.8.0