Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: ../phpdbedittk/gadmintertablecommand.php
PHPDBEditTk -

gadm_intertable_command

gadm_command
   |
  +-- gadm_intertable_command

Handles relations between tables together with the

 

private class gadm_intertable_command extends gadm_command

Handles relations between tables together with the
tables_relation classDepending on the current view mode of genericadmin, this classreturns appropriate values for foreign key fields, which canthen be displayed by genericadmin. The foreign key values areeither the values of a description field in the referenced tableor a html select box.
The class also caches the referenced tables in a local array.

 

Methods inherited from gadm_command

_save_constructor_params, construct, checkinput, checkfilterinput

Public Method Summary

void

gadm_intertable_command()

initialies the intertable command

Private Method Summary

string

_package_primary_key_name(string $tablename)

Creates a serialized name from a possible composite primary key in
string

_package_primary_key(string $tablename, array $row)

Creates a serialized value for the possibly composite pk from a
void

_check_table_cache_status(string $tablename, $remove_filter)

Checks if the requested table is already cached in the local
mixed

execute(string $func_usage, string $value)

Returns the appropriate display for the foreign key field.Warning: documentation is missing.

Fields inherited from gadm_command

$command_types, $optable, $fieldname, $sender

Private Field Summary

array

$localtablecache

Caches the referenced tables.
object db_connect

$db

Local db object

Included files Summary, Type: include

dirname(__FILE__)."/dbmodel.php" Warning: documentation is missing.

Public Method Details

gadm_intertable_command

public void gadm_intertable_command( )

  initialies the intertable command
This means getting references to a db access layer and the globaldbmodel object.

Returns void


Private Method Details

_package_primary_key_name

private string _package_primary_key_name( string $tablename )

  Creates a serialized name from a possible composite primary key in
a table. All pk fields are concatenated by ";"

Parameter
string $tablename
name of the table
Returns string

The serialized PK


_package_primary_key

private string _package_primary_key( string $tablename, array $row )

  Creates a serialized value for the possibly composite pk from a
data rowe composite primary key in a table. All pk fields areconcatenated by ";"

Parameter
string $tablename
name of the table
array $row
row of data
Returns string

The serialized PK


_check_table_cache_status

private void _check_table_cache_status( string $tablename, $remove_filter )

  Checks if the requested table is already cached in the local
tablecache. If not, fetches the data and reassociates therows by the primary key.

Parameter
string $tablename
the name of the table
$remove_filter
Warning: documentation is missing.
Returns void


execute

private mixed execute( string $func_usage, string $value )

  Returns the appropriate display for the foreign key field.
Returns onlysomething if called from
- form display (func_usage: db2fopfuncs)
- detail display (func_usage: db2dopfuncs)
- table display (func_usage: db2topfuncs)

execute returns for table and detail mode the value of the first displaycolumn of the references table. For form mode, it can display either the samevalue as in detail mode combined with a hidden field or an html selector withthe value selected. This is determined by the command setting "formdisplay" inthe db definitions. The html selector is produced with an additional entry"--none--" (value 0), when the src_complexity of the table relation is "0"

Warning: documentation is missing.

Parameter
string $func_usage
the function usage type, which is directly dependent on the genericadmin display mode at the moment
string $value
the value of the foreign key
Returns mixed

appropriate display for this foreign key.


Private Field Details

$localtablecache

private array $localtablecache

>>array()<<

Caches the referenced tables.
Caches the results of whole table fetches to be reused, if thereis more than one select box on the page, eg. when generic_adminuses the table_edit mode.</br>


$db

private object db_connect $db

>><<

Local db object


Included Files, Type: include

dirname(__FILE__)."/dbmodel.php"

include( dirname(__FILE__)."/dbmodel.php" )




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta