php - How to raise CComponent event in Yii -


I call graphs like went provided they assume component pages (Yahoo Finance). The Component View template contains a bunch of AHHRF, which I want to switch between periods in the graph. I have created events and event handlers in the component. I have two questions:

  1. How to increase the occurrence on graph component through those a_hrefs (should they have a graph part?) >
  2. How to rebuild the graph without losing the curent page? The reference (section, filter - specified as $ _GET values)

My graph component will look like this:

  Yii :: import ('zii. Widgets? .CPortlet '); Class Graph Seismeral {Private $ _ Duration; / * **************************************** * component properties * ** ************************************** * / public function getPeriod () {$ this- return & Gt; _period; } Public Function Set Period ($ Period) {$ this- & gt; _period = $ period; }  /* **************************************** *  *                 Normal                  *  * ** ************************************** * / public function init () {parent :: Init (); // event handlers allocated $ this- & gt; OnPeriodChange = array ($ 'handlePeriodChange'); } Protected function renderContent () {$ this- & gt; Presenting ('graph'); }  /* **************************************** *  *                 Arrangement                   *  * ** ***************************************** Public Events onPeriodChange ($ event) {$ this - & gt; Increase ('project', $ event); } / * **************************************** * event handlers * *********************************************** Public event handlePeriodChange ($ event) {/ / Code>}  

"itemprop =" text ">

I think if you have event handlers then the event phone is present Can say

  public function setPeriod ($ period) {if ($ this-> hasEventHandler ('onPeriodChange')) $ this- & gt; OnPeriodChange ($ this); $ This- & gt; _period = $ period; }  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -