phpDocumentor CYap
[ Back ] [ class tree: CYap ] [ index: CYap ] [ all elements ]

Class: CYap

Source Location: /CYap.php

Class CYap

Class Overview
Property Summary
resource   $db   Handle to the db connection
boolean   $DbOpened   Flag of the connection to the database. True the connection is open (by the class or by the caller), false, the connection need to be opened.
object CYapDb   $Db_Class   Istance of the database class abstraction
mixed   $db_info  
boolean   $DetailMode   Do I show the full detail of the rows? (True).Or do I show a table with many rows? (False)
array   $EventTable   Event handler table. Set the hanlder to execute on each event.
array   $FieldType   Associative array, it contains the pair field_name / type, where type is 'A' or 'N'.
array   $FieldUseRegex   The where condition should use the equal or regular expression to match the value? The array is indexed by field name. The field my be omitted if it doesn't require the regular expression.
array   $Lang   Table containing the translated message
string   $Mode   Requested Mode. Which mode is configured.
array   $modify_info   Configuration details about row editing feature
boolean   $NeedOpenDb   Is the module required to open the connection to the database. Set by the configuration data.
boolean   $NoSearchBox   Should be the search bo shown?
string   $OrderDirection   Which type of order. A=upward, D=descendent
string   $OrderField   Filed name used to order the data. Set by configuration data, it may be changed by the user
array   $OutFormats   Associative array containing the commands to formats the output text, indexed by the format name.
integer   $PageRequest   Number of the requested page to show
string   $PagerExit   Referer to pass as the 'exit' link
integer   $PagSize   Number of rows to show per page
string   $Prefix   Prefix to apply to the session name. It is usefull
boolean   $Pre_1_0_Style   Compatibility issue. In detail mode, the 1.1.1 allows to set which columns show.
array   $Query_Field   Associative array iwhich contains the value to look for. The index is the name of the field where look for the value.
mixed   $search_field  
boolean   $ShowFirstPage   As normal behaviour CYap at the first call show only the search
mixed   $show_field  
array   $show_info   Configuration details about how to show the data
integer   $TotRow   Total number of rows from the requested query
array   $WrongFields   Table indexed by the name of fields filled with wrong value

[ Top ]
Method Summary
CYap   CYap()   Table viev class reference
void   analize_request()   The function parse the text from the search box and build the information
void   check_db()   Check and load the configuration information about the database connection coming from the caller
void   check_modify_info()   Check and load the configuration information about the add/modify/delete row
void   check_orderfield()   Look into the $_REQUEST for the sort parameter. If any, the function update the contents of OrderField and/or OrderDirection
void   check_search()   Check and load the configuration information about the search box coming from the caller
void   check_showfield()   Check and load the configuration information about the fields to show coming from the caller
void   check_show_info()   Check and load the configuration information coming from the caller
void   ForgetAll()   Clean all session parameters. It is usefull to avoid conflict with another execution of this class within the same session
boolean   InDetailMode()   InDetailMode - Am I in 'deatil mode'?
void   load_previous_data()   Class behaviour setup from session or post parameter.
boolean   perform_query()   Perform the query on database to retrieve the rows to show
boolean   RegisterEvent()   Register a new or modify an event, and its handler
void   select_page()   select_page from a list of 5 pages before and 5 pages after
void   showpage()   function to show the page
void   show_detail_row()   Show one data row. Detail view. Called by _ShowDetailMode, this function fills each table cells.
void   show_form()   Show the search box. The function make the HTMl code for the form,
void   show_header()   Show the column header
void   show_selectors()   Page picker (begin,previuos,next,end)
void   show_single_row()   Show one table row. Called by _ShowTableMode, the function fills one row of the table.
void   show_table_rows()   Show rows: main function to open the table, and retrieve data from database
string   var_padding()   Pad the given field to match the requested size
void   _AddHrefLink()   If allowed, add the link to the add row function
void   _Apice()   String quote, for each type of Mysql field the function return the single quote
array   _BuildControlTable()   Build the control object for each field and return it.
bool   _CheckAuthorization()   Ask to the callback function (if I have one ) if the current
bool   _CheckFieldCallBack()   Check if the field name in $Key contains a valid value. If not return false The function perform the check by the provided callback function. If any return true.
array   _CompileFieldType()   Build the array that contains all information about the field
bool   _DeleteExecute()   Ok, I get the confirm to remove the row, I do it!
string   _DeleteHrefLink()   If allowed, add the link to the delete function for the currente row
void   _DeleteRequestConfirm()   Request the confirm to remove the row
string   _DetHrefLink()   function to show the link to the detail mode for the current record
void   _DisplayData()   Perform the actions required to display the rows (table/detail mode)
void   _DoEvent()   Execute the function related to the given event. Note, it recognizes only the evens
void   _DontAllow()   The user is not allowed to perform the operation, show the message
array   _FillFromRequest()   For each field, check from the request, if I have some value
void   _InitializeSessionVar()   Initialize the session vars
void   _JsOut()   Send the Javascript code required by Yap to output the tooltip
void   _JsSearchBoxCheck()   Js code to validate the search box form.
void   _LoadCfg()   Load the configuration file
void   _ManageFormats()   Parse the output formats from info['outformat'], and converts that informations into executable commands.
void   _ModifyExecute()   Add/Update the record
string   _ModifyHrefLink()   If allowed, add the link to the modify function for the currente row
void   _ModifyInputForm()   Show the form for modify/insert a new row
void   _ModifySuccessed()   Operation (add/modify) executed with success, draw the messge
void   _OnAbortModify()  
void   _OnAbortRemove()   Ops, I don't want remove this row
void   _OnAbortSaveRow()   Click on 'abort button' on 'new row' form
void   _OnCmdExecuted()   Click on 'OK' button on the form 'Command executed'
void   _OnDetailClick()   Click on button show row detail
void   _OnDoModify()   ok, the modify form is filled, store the new values
void   _OnDoRemove()   Yes delete this row
void   _OnDoSaveRow()   Ok, the 'new row' form is filled, store the data
void   _OnDrawCurrent()   Draw the data from the current status
void   _OnExit()  
void   _OnFirstTime()   First time the module is called. Initialize the internal status and don't expect any information
void   _OnModifyClick()   Click on 'modify row' link
void   _OnNewRow()   Click on 'add row' button
void   _OnOrderDown()   Click on table header to change the order type
void   _OnOrderUp()   Click on table header to change the order type
void   _OnRemoveClick()   Click on 'delete row' link
void   _OnSearch()   Filled the search form. Parse the new search parameters, and display the new result.
void   _OnTableView()   Click on button show rows table
void   _OnToPage()   Skip to a new page. This event expects the pag parameter to know which is the new page
void   _OpenDb()   Open the connection to the database
array   _RetrieveFieldType()   Retrieve the field definition from the database
array   _RetrieveRow()   Retrieve the row contents from the database
void   _RunDisplayFunc()   Run the display function based on mode switch
void   _SaveToSession()   Store some information into session
void   _SetDefaultHandler()   Set the event table to the default handler
void   _ShowDetailMode()   Shows the row detail. Actually the function doesn't show anything, it calls the various function from the class tabledatail. Those functions make the html code to show the data.
void   _ShowModifyBox()   Build the form for the input/add row
void   _ShowSearchBox()   Call the CYapBox to show th search box. This function is splitted from the previous to allow to override it if you need to cheng the search box layout.
void   _ShowTableMode()   Shows the requested row. Actually the function doesn't show anything, it calls the various function from the class tableview. Those functions make the html code to show the data.
void   _ToolTipJs()   Javascript code required to draw the tooltips
void   _ToolTipsDiv()   Html code require do draw the tool tips

[ Top ]
Properties
resource   $db [line 110]

Handle to the db connection


[ Top ]
boolean   $DbOpened [line 67]

Flag of the connection to the database. True the connection is open (by the class or by the caller), false, the connection need to be opened.


[ Top ]
object CYapDb   $Db_Class [line 197]

Istance of the database class abstraction


[ Top ]
mixed   $db_info [line 43]

[ Top ]
boolean   $DetailMode [line 192]

Do I show the full detail of the rows? (True).Or do I show a table with many rows? (False)


[ Top ]
array   $EventTable [line 151]

Event handler table. Set the hanlder to execute on each event.

API Tags:
See:  CYap::_SetDefaultHandler()
See:  CYap::_DoEvent()


[ Top ]
array   $FieldType [line 157]

Associative array, it contains the pair field_name / type, where type is 'A' or 'N'.

'A' means text field, and 'N' means numeric field.


[ Top ]
array   $FieldUseRegex [line 164]

The where condition should use the equal or regular expression to match the value? The array is indexed by field name. The field my be omitted if it doesn't require the regular expression.


[ Top ]
array   $Lang [line 77]

Table containing the translated message


[ Top ]
string   $Mode [line 125]

Requested Mode. Which mode is configured.

Values: DisplayTable -> Table view DisplayDetail -> Row details (one page per row) Modify -> Shows the modify box. It requires the keyid of the row to modify Add -> It shows the 'add row' box.


[ Top ]
array   $modify_info [line 54]

Configuration details about row editing feature


[ Top ]
boolean   $NeedOpenDb [line 187]

Is the module required to open the connection to the database. Set by the configuration data.

It is usefull to set this field to false if you want use the temporary table build by the caller script.


[ Top ]
boolean   $NoSearchBox [line 180]

Should be the search bo shown?


[ Top ]
string   $OrderDirection [line 175]

Which type of order. A=upward, D=descendent


[ Top ]
string   $OrderField [line 170]

Filed name used to order the data. Set by configuration data, it may be changed by the user

by click on columns headers


[ Top ]
array   $OutFormats [line 132]

Associative array containing the commands to formats the output text, indexed by the format name.

API Tags:
See:  CYap::_ManageFormats()


[ Top ]
integer   $PageRequest [line 105]

Number of the requested page to show


[ Top ]
string   $PagerExit [line 100]

Referer to pass as the 'exit' link


[ Top ]
integer   $PagSize [line 95]

Number of rows to show per page


[ Top ]
string   $Prefix [line 61]

Prefix to apply to the session name. It is usefull

to avoid conflict between two execution of this class within the same session


[ Top ]
boolean   $Pre_1_0_Style [line 144]

Compatibility issue. In detail mode, the 1.1.1 allows to set which columns show.

The way requires that the column to show must listed in $ShowFieldCfg, otherwise the module assume to not show the column. The previous version, in detail mode, shows all columns regardless the $ShowFieldCfg parameter. Set this variable to false if you want to gain more control on the field to show in detail mode, or set to true if you prefer the old behaviour. Default: true

API Tags:
See:  CYap::show_detail_row()


[ Top ]
array   $Query_Field [line 90]

Associative array iwhich contains the value to look for. The index is the name of the field where look for the value.


[ Top ]
mixed   $search_field [line 41]

[ Top ]
boolean   $ShowFirstPage [line 84]

As normal behaviour CYap at the first call show only the search

box. If this variabiles is set to true, CYap shows the first 15 row from the input query. Default: false


[ Top ]
mixed   $show_field [line 42]

[ Top ]
array   $show_info [line 49]

Configuration details about how to show the data

API Tags:
See:  CYap::check_show_info()


[ Top ]
integer   $TotRow [line 115]

Total number of rows from the requested query


[ Top ]
array   $WrongFields [line 72]

Table indexed by the name of fields filled with wrong value


[ Top ]
Methods
Constructor CYap  [line 223]

  CYap CYap( [array $search_field = array()], [array $show_field = array()], [array $db_info = array()], [array $show_info = array()], [mixed $modify_info = array()]  )

Table viev class reference

Request (post/get) parameters of: OrderField set when the user click on the header filedname. It change the field to use to order the table. Values: field name. None = use the current order field (session var OrderField) ot: OrderDirection, chenge the order direction on the field specified by of DetailMode: (default false), if true yap shows the full detail row, if false the class shows the table. If it doesn't exist, the class looks for it into the session vars and into the configuration params. Pag: page number, the class shows the request page. If it doesn't exist, the class looks for it into session var (show the same page as the referrer). If the class doesn't find it, the first page will be shown . ev: event occurred to the form. id: row identification value used by update/delete function. If it doesn't set, the class swicth into insert mode (if cmd=m).

Parameters:
array   $search_field: 
array   $show_field: 
array   $db_info: 
array   $show_info: 

API Tags:
See:  CYap::load_previous_data()
Access:  public


[ Top ]
analize_request  [line 1046]

  void analize_request( )

The function parse the text from the search box and build the information

required to perform the query


API Tags:
Access:  private


[ Top ]
check_db  [line 342]

  void check_db( array $info  )

Check and load the configuration information about the database connection coming from the caller

Parameters:
array   $info:  parameters from the caller

API Tags:
Access:  private


[ Top ]
check_modify_info  [line 473]

  void check_modify_info( array $info  )

Check and load the configuration information about the add/modify/delete row

Parameters:
array   $info:  parameters from the caller or configuration file

API Tags:
Access:  private


[ Top ]
check_orderfield  [line 1265]

  void check_orderfield( )

Look into the $_REQUEST for the sort parameter. If any, the function update the contents of OrderField and/or OrderDirection

CGI parameter of -> orderField ot -> Order Type = order direction Session parameter OrderField set OrderDirection set


API Tags:
See:  CYap::$OrderDirection
See:  CYap::$OrderField
Access:  private


[ Top ]
check_search  [line 305]

  void check_search( array $info  )

Check and load the configuration information about the search box coming from the caller

Parameters:
array   $info:  parameters from the caller

API Tags:
Access:  private


[ Top ]
check_showfield  [line 329]

  void check_showfield( array $info  )

Check and load the configuration information about the fields to show coming from the caller

Parameters:
array   $info:  parameters from the caller

API Tags:
Access:  private


[ Top ]
check_show_info  [line 383]

  void check_show_info( array $info  )

Check and load the configuration information coming from the caller

Parameters:
array   $info:  parameters from the caller

API Tags:
Access:  private


[ Top ]
ForgetAll  [line 579]

  void ForgetAll( )

Clean all session parameters. It is usefull to avoid conflict with another execution of this class within the same session


API Tags:
Access:  public


[ Top ]
InDetailMode  [line 1796]

  boolean InDetailMode( )

InDetailMode - Am I in 'deatil mode'?


API Tags:
Access:  private


[ Top ]
load_previous_data  [line 1142]

  void load_previous_data( )

Class behaviour setup from session or post parameter.

The post parameter has the precedence over the session parameter


API Tags:
Access:  private


[ Top ]
perform_query  [line 1288]

  boolean perform_query( )

Perform the query on database to retrieve the rows to show


API Tags:
Return:  true on success, false on error
Access:  private


[ Top ]
RegisterEvent  [line 685]

  boolean RegisterEvent( string $EventName, string $Handler  )

Register a new or modify an event, and its handler

Parameters:
string   $EventName:  event name
string   $Handler:  function handler

API Tags:
Access:  public


[ Top ]
select_page  [line 1766]

  void select_page( )

select_page from a list of 5 pages before and 5 pages after


API Tags:
Access:  private


[ Top ]
showpage  [line 880]

  void showpage( [string $ForcedEvent = '']  )

function to show the page

Parameters:
string   $ForcedEvent:  forced event. If any th function looks for $_REQUEST['ev'] if set.

API Tags:
Access:  public


[ Top ]
show_detail_row  [line 1672]

  void show_detail_row( array $DataRow, [boolean $Show = true], array $Fields, object CYap_DetailView &$clsTable  )

Show one data row. Detail view. Called by _ShowDetailMode, this function fills each table cells.

It is called when the module is set to detail mode

Parameters:
array   $DataRow:  array associativo con il record restituito dalla query
boolean   $Show:  should I show the table or return it as string? (true->show, false->return as string)
array   $Fields:  list of filed to be shown
object CYap_DetailView   $clsTable:  reference to the class used to print the table

API Tags:
Access:  private
See:  CYap::_ShowDetailMode()


[ Top ]
show_form  [line 1204]

  void show_form( )

Show the search box. The function make the HTMl code for the form,

The box is shown through the module CYapBox (called by the function _ShowSearchBox)


API Tags:
See:  CYap::_ShowSearchBox()
Access:  private


[ Top ]
show_header  [line 1463]

  void show_header( object CYap_table &$clsTable  )

Show the column header

Each header is a link to this page with parameters to change the sort direction and field

Parameters:
object CYap_table   $clsTable:  reference to the class used to print the table

API Tags:
Access:  private


[ Top ]
show_selectors  [line 1713]

  void show_selectors( )

Page picker (begin,previuos,next,end)


API Tags:
Access:  private


[ Top ]
show_single_row  [line 1509]

  void show_single_row( array $RowData, integer $RowNumber, object CYap_table &$clsTable  )

Show one table row. Called by _ShowTableMode, the function fills one row of the table.

It takes the list of the required fields from configuration var $this->show_field, and the field's data from the parameter $RowData.

Parameters:
object CYap_table   $clsTable:  reference to the class used to print the table
array   $RowData:  associative array containing the row data from the query statement
integer   $RowNumber:  number of row's table. First row: 1

API Tags:
Access:  private
See:  CYap::$show_field
See:  CYap::_ShowTableMode()


[ Top ]
show_table_rows  [line 1336]

  void show_table_rows( )

Show rows: main function to open the table, and retrieve data from database


API Tags:
Access:  private


[ Top ]
var_padding  [line 1115]

  string var_padding( integer $size, string $padding, string $paddingchar, string $text  )

Pad the given field to match the requested size

Parameters:
integer   $size:  the output size
string   $padding:  type of pad (none,left,right,center)
string   $paddingchar:  char to use to pad
string   $text:  input text

API Tags:
Return:  the 'padded' string
Access:  private


[ Top ]
_AddHrefLink  [line 1648]

  void _AddHrefLink( object CYap_TableView &$clsTable  )

If allowed, add the link to the add row function

Parameters:
object CYap_TableView   $clsTable: 

API Tags:
Access:  private


[ Top ]
_Apice  [line 2244]

  void _Apice( string $fieldType  )

String quote, for each type of Mysql field the function return the single quote

if required

Parameters:
string   $fieldType:  Mysql field type

API Tags:
Access:  private


[ Top ]
_BuildControlTable  [line 1990]

  array _BuildControlTable( array $tblFields  )

Build the control object for each field and return it.

Parameters:
array   $tblFields:  array of all table columns

API Tags:
Return:  array of all created control to manage each field
Access:  private


[ Top ]
_CheckAuthorization  [line 2361]

  bool _CheckAuthorization( string $Key, string $Action  )

Ask to the callback function (if I have one ) if the current

user may perform the requested function The allowed action are: RemoveRow, AddRow, ModifyRow If I haven't any callback function return true

Parameters:
string   $Key:  row key to apply the action
string   $Action:  action The allowed action are: RemoveRow, AddRow, ModifyRow

API Tags:
Return:  true-> perform the job, false user not allowed
Access:  private


[ Top ]
_CheckFieldCallBack  [line 2420]

  bool _CheckFieldCallBack( array $row, string $Key  )

Check if the field name in $Key contains a valid value. If not return false The function perform the check by the provided callback function. If any return true.

Parameters:
array   $row:  all the row value returned from the form
string   $Key:  field name

API Tags:
Access:  private


[ Top ]
_CompileFieldType  [line 2180]

  array _CompileFieldType( array $meta, string $flags, array $CfgParam  )

Build the array that contains all information about the field

Parameters:
array   $meta:  information from mysql
string   $flags:  field's flags
array   $CfgParam:  information about the field from the configuration paramaters

API Tags:
Access:  private


[ Top ]
_DeleteExecute  [line 2321]

  bool _DeleteExecute( )

Ok, I get the confirm to remove the row, I do it!


API Tags:
Return:  successed or not
Access:  private


[ Top ]
_DeleteHrefLink  [line 1609]

  string _DeleteHrefLink( array $RowData  )

If allowed, add the link to the delete function for the currente row

Parameters:
array   $RowData:  row values

API Tags:
Access:  private


[ Top ]
_DeleteRequestConfirm  [line 2279]

  void _DeleteRequestConfirm( )

Request the confirm to remove the row


API Tags:
Access:  private


[ Top ]
_DetHrefLink  [line 1578]

  string _DetHrefLink( integer $RowNumber, array $RowData  )

function to show the link to the detail mode for the current record

Parameters:
integer   $RowNumber:  current row number. First row: 1
array   $RowData:  row values

API Tags:
Access:  private


[ Top ]
_DisplayData  [line 1013]

  void _DisplayData( )

Perform the actions required to display the rows (table/detail mode)


API Tags:
Access:  private


[ Top ]
_DoEvent  [line 628]

  void _DoEvent( string $ev  )

Execute the function related to the given event. Note, it recognizes only the evens

whose name begins with YAP_

Parameters:
string   $ev: 

API Tags:
Access:  private


[ Top ]
_DontAllow  [line 2403]

  void _DontAllow( )

The user is not allowed to perform the operation, show the message


API Tags:
Access:  private


[ Top ]
_FillFromRequest  [line 2064]

  array _FillFromRequest( array $row, array $Fields  )

For each field, check from the request, if I have some value

from the previous input field (an insert/modify not approved)

Parameters:
array   $row:  It contains each field and its values from the database
array   $Fields:  List of all required fields

API Tags:
Access:  private


[ Top ]
_InitializeSessionVar  [line 597]

  void _InitializeSessionVar( )

Initialize the session vars


API Tags:
Access:  private


[ Top ]
_JsOut  [line 1809]

  void _JsOut( )

Send the Javascript code required by Yap to output the tooltip


API Tags:
Access:  private


[ Top ]
_JsSearchBoxCheck  [line 1192]

  void _JsSearchBoxCheck( )

Js code to validate the search box form.

The base class implementation do nothing (return always true), but it allows extend and customize the checks on value entered into the search box.


API Tags:
See:  CYap::show_form()
Access:  private


[ Top ]
_LoadCfg  [line 258]

  void _LoadCfg( string $FileName  )

Load the configuration file

Parameters:
string   $FileName: 

API Tags:
Access:  private


[ Top ]
_ManageFormats  [line 537]

  void _ManageFormats( )

Parse the output formats from info['outformat'], and converts that informations into executable commands.

Set the default formats Default formats: NONE: no format applied NUMERIC_IT: numeric number, Italian format x.xxx.xxx NUMERIC_EN: numeric number, English format x,xxx,xxx.xx MONEY_IT : monetary Italian format x.xxx.xxx,xx MONEY_EN : monetary English format x,xxx,xxx.xx DATE_IN : convert timestamps into Italian dormat date day/month/year DATE_US : convert timestamps into US format date month/day/year Initialise the $this->OutFormat array;


API Tags:
Access:  private


[ Top ]
_ModifyExecute  [line 1906]

  void _ModifyExecute( bool $Add  )

Add/Update the record

Parameters:
bool   $Add:  True=add mode (I have not the key value, field id)

API Tags:
Access:  private


[ Top ]
_ModifyHrefLink  [line 1629]

  string _ModifyHrefLink( array $RowData  )

If allowed, add the link to the modify function for the currente row

Parameters:
array   $RowData:  row values

API Tags:
Access:  private


[ Top ]
_ModifyInputForm  [line 1849]

  void _ModifyInputForm( bool 0, string 1  )

Show the form for modify/insert a new row

Parameters:
bool   0:  True=add mode (I have not the key value, field id)
string   1:  record id (used only in Modify Mode)

API Tags:
Access:  private


[ Top ]
_ModifySuccessed  [line 1974]

  void _ModifySuccessed( )

Operation (add/modify) executed with success, draw the messge


API Tags:
Access:  private


[ Top ]
_OnAbortModify  [line 740]

  void _OnAbortModify( )



[ Top ]
_OnAbortRemove  [line 764]

  void _OnAbortRemove( )

Ops, I don't want remove this row


API Tags:
Access:  private


[ Top ]
_OnAbortSaveRow  [line 828]

  void _OnAbortSaveRow( )

Click on 'abort button' on 'new row' form


API Tags:
Access:  private


[ Top ]
_OnCmdExecuted  [line 772]

  void _OnCmdExecuted( )

Click on 'OK' button on the form 'Command executed'


API Tags:
Access:  private


[ Top ]
_OnDetailClick  [line 711]

  void _OnDetailClick( )

Click on button show row detail


API Tags:
Access:  private


[ Top ]
_OnDoModify  [line 730]

  void _OnDoModify( )

ok, the modify form is filled, store the new values


API Tags:
Access:  private


[ Top ]
_OnDoRemove  [line 756]

  void _OnDoRemove( )

Yes delete this row


API Tags:
Access:  private


[ Top ]
_OnDoSaveRow  [line 816]

  void _OnDoSaveRow( )

Ok, the 'new row' form is filled, store the data


API Tags:
Access:  private


[ Top ]
_OnDrawCurrent  [line 865]

  void _OnDrawCurrent( )

Draw the data from the current status


API Tags:
Access:  private


[ Top ]
_OnExit  [line 789]

  void _OnExit( )



[ Top ]
_OnFirstTime  [line 847]

  void _OnFirstTime( )

First time the module is called. Initialize the internal status and don't expect any information

from session


API Tags:
Access:  private


[ Top ]
_OnModifyClick  [line 721]

  void _OnModifyClick( )

Click on 'modify row' link


API Tags:
Access:  private


[ Top ]
_OnNewRow  [line 807]

  void _OnNewRow( )

Click on 'add row' button


API Tags:
Access:  private


[ Top ]
_OnOrderDown  [line 703]

  void _OnOrderDown( )

Click on table header to change the order type


API Tags:
Access:  private


[ Top ]
_OnOrderUp  [line 695]

  void _OnOrderUp( )

Click on table header to change the order type


API Tags:
Access:  private


[ Top ]
_OnRemoveClick  [line 748]

  void _OnRemoveClick( )

Click on 'delete row' link


API Tags:
Access:  private


[ Top ]
_OnSearch  [line 837]

  void _OnSearch( )

Filled the search form. Parse the new search parameters, and display the new result.


API Tags:
Access:  private


[ Top ]
_OnTableView  [line 797]

  void _OnTableView( )

Click on button show rows table


API Tags:
Access:  private


[ Top ]
_OnToPage  [line 781]

  void _OnToPage( )

Skip to a new page. This event expects the pag parameter to know which is the new page

to show up


API Tags:
Access:  private


[ Top ]
_OpenDb  [line 2458]

  void _OpenDb( )

Open the connection to the database



[ Top ]
_RetrieveFieldType  [line 2114]

  array _RetrieveFieldType( [resource $res = NULL], [boolean $ModifyMode = true]  )

Retrieve the field definition from the database

Parameters:
resource   $res:  return by mysql_query from whom get the field type
boolean   $ModifyMode:  true if I return the list of the field to be changed (use modify_info) false if I return all field from the table (view mode)

API Tags:
Access:  private


[ Top ]
_RetrieveRow  [line 2086]

  array _RetrieveRow( string $KeyValue, array $Fields  )

Retrieve the row contents from the database

Parameters:
string   $KeyValue:  key the affected row
array   $Fields:  fields type

API Tags:
Access:  private


[ Top ]
_RunDisplayFunc  [line 970]

  void _RunDisplayFunc( )

Run the display function based on mode switch


API Tags:
Access:  private


[ Top ]
_SaveToSession  [line 961]

  void _SaveToSession( )

Store some information into session


API Tags:
Access:  private


[ Top ]
_SetDefaultHandler  [line 654]

  void _SetDefaultHandler( )

Set the event table to the default handler


API Tags:
See:  CYap::RegisterEvent()
See:  CYap::CYap()
Access:  private


[ Top ]
_ShowDetailMode  [line 1402]

  void _ShowDetailMode( array $Fields, resource $result  )

Shows the row detail. Actually the function doesn't show anything, it calls the various function from the class tabledatail. Those functions make the html code to show the data.

Parameters:
array   $Fields:  it contains the list of fields to be shown
resource   $result:  Database query handler

API Tags:
Access:  private
See:  CYap::show_detail_row()


[ Top ]
_ShowModifyBox  [line 2050]

  void _ShowModifyBox( array $Row, array $Fields, bool $Add, string $KeyValue, array $Controls  )

Build the form for the input/add row

Parameters:
array   $Row:  array of the value for each field
array   $Fields:  it contains the fields informations from the database
bool   $Add:  I'm adding or modifing the row?
string   $KeyValue:  Value of the index key for the row to modify
array   $Controls:  array carrying the objects required to show the form

API Tags:
Access:  private


[ Top ]
_ShowSearchBox  [line 1244]

  void _ShowSearchBox( string $txt  )

Call the CYapBox to show th search box. This function is splitted from the previous to allow to override it if you need to cheng the search box layout.

Parameters:
string   $txt:  Html code to show the search form

API Tags:
Access:  private


[ Top ]
_ShowTableMode  [line 1429]

  void _ShowTableMode( array $Fields, resource $result  )

Shows the requested row. Actually the function doesn't show anything, it calls the various function from the class tableview. Those functions make the html code to show the data.

Parameters:
array   $Fields:  it contains the list of fields to be shown
resource   $result:  Database query handler

API Tags:
See:  CYap::show_single_row()
Access:  private


[ Top ]
_ToolTipJs  [line 1821]

  void _ToolTipJs( )

Javascript code required to draw the tooltips


API Tags:
Access:  private


[ Top ]
_ToolTipsDiv  [line 1833]

  void _ToolTipsDiv( )

Html code require do draw the tool tips

This function is expected to run inside the body of the page


API Tags:
See:  CYap::_JsOut()
See:  CYap::_ToolTipJs()
Access:  private


[ Top ]

Documentation generated on Sat, 26 Feb 2005 14:09:56 +0100 by phpDocumentor 1.3.0RC3