Documentation


SEARCH

TABLE OF CONTENT

    1. Getting started 2. Basic concepts 3. Request dispatching 4. Context container 5. Dual MVC 6. Component model: 7. Security 8. Configuration 9. Session handling 10. I18n 11. Cache 12. Logging 13. Error handling 14. Advanced Topics 15. API reference

      Tutorials: Frequently Asqued Questions

      See also:


      Class: __DataCollectorComponent


      Class Overview

      Data collector is a component designed to collect data while rendering the UI.

      It's usefull to set information rendered to the view in order to be retrieved from the event handler.

      i.e.

      1.    <comp:datacollector name="invoice_info">
      2.      <comp-property name="invoice_id">{$invoice_id}</comp-property>
      3.      <comp-property name="client_id">{$client_id}</comp-property>
      4.    </comp:datacollector>

      Once we have stored information from the view to the data collector, we can retrieve it from the event handler.

      i.e.

      1.    public function beforeRender({
      2.        $invoice_data_collector $this->getComponent('invoice_info');
      3.        //get the invoice id as well as the client id:
      4.        $invoice_id $invoice_data_collector->invoice_id;
      5.        $client_id  $invoice_data_collector->client_id;
      6.    }

      The data collector is not poolable, which means that can be retrieved only in create and beforeRender events.


      __UIComponent
         |
         --__DataCollectorComponent
      [ Top ]

      Inherited Properties, Constants, and Methods

      Inherited Properties Inherited Methods Inherited Constants

      Inherited From __UIComponent

      Inherited From __UIComponent


      [ Top ]

      Properties

      Methods