Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/mitarbeiter/sven/public_html/tmp/devcon_php_base/admin_panel/admin_panel.class
dev/con php base - User interface

admin_panel

singleton
   |
  +-- admin_panel

User interface

 

public class admin_panel extends singleton

User interface

 

Methods inherited from singleton

singleton

Public Method Summary

void

admin_panel(object application &$app, [ integer $widgets ])

Initialise everything.
void

close()

Finish HTML document and exit.
object admin_panel

&instance()

Get reference to the one and only instance of this class.Warning: documentation is missing.
void

open_context(object cursor &$cursor)

Open a new context.
void

close_context()

Return to former context.
void

use_filter(string $filtername)

Set form filter function.
object cursor

&get_cursor()

Get the cursor used in the current context.
void

clear_record_cache()

Clear the record cache.
void

value(string $field_name)

Get a field from a record the current context points to.
void

set_value(string $field, mixed $val)

Set a field in the record cache.
void

header(string $header, [ string $comp ])

Print document header.
void

headline(string $text)

Print a headline.
void

msgbox(string $message, [ integer $color ])

Print an informal message box.
void

panic(string $message)

Print error message and die.
void

confirm(string $msg, string $option_yes, object event $event_yes, string $option_no, object event $event_no, [ integer $color ])

Print confirmation box.
void

set_default_formevent(object event $event)

Set default form event for current context.
void

open_form([ integer $default_event ])

Open form that is posted to form parser form_parser().
void

close_form()

Close an opened form.
void

open_table(integer $attrs)

Open a table.
void

close_table()

Close an opened table.
void

open_row(integer $attrs)

Open a row.
void

close_row()

Close an opened row.
void

open_cell(integer $attrs)

Open a cell.
void

close_cell()

Close an opened cell.
void

table_headers(array $titles, integer $attrs)

Create table header from array of strings.
void

show(string $field)

Print contents of a record's field.
void

show_ref(string $field, string $source, string $column)

Create cell with contents of row in a referenced table.
void

paragraph(string $html)

Print a paragraph.
void

open_widget([ string $field, integer $attr ])

Open a row and cell for a widget and set the current field.
void

close_widget()

Close opened call and row.
void

print_text(string $text)

Print text.
void

label(string $text)

Print label.
void

show_mime_image(string $field, string $type)

Print image.
void

inputline(string $field, integer $maxlen)

Print an input line.
void

password(string $field, integer $maxlen, string $label)

Print a password line.
void

radiobox(string $field, string $label_true, string $label_false, [ mixed $value_true, mixed $value_false ])

Print boolean radio box.
void

select_id(string $field, string $source, string $column, string $id, [ string $where ])

Select an entry in a foureign table and store its primary key.
void

textarea(string $field, integer $width, integer $height)

Print textarea.
void

fileform(string $field, [ string $typefield, string $filenamefield ])

Print file upload widget.
void

checkbox(string $field, [ integer $event ])

Print a checkbox.
void

reset_button([ string $label ])

Print a reset button.
string

submit_name([ integer $event ])

Get name for a submit button.
void

submit_button(string $label, [ integer $view ])

Print a submit button.
void

submit_image(string $label, string $image, [ integer $view ])

Print a submit image.
void

use_anchor()

Switch on use of anchors.
void

no_anchor()

Switch off use of anchors.
void

link(string $label, object event $event, [ string $fakename ])

Print a link.
void

fileurl(string $source, string $field, string $key, string $mime_type, integer $data)

# Create a url of a file.
void

url(object event &$event)

Create URL from event object.
void

new_formfield(string $field, [ integer $event, integer $f ])

Create form name for a field in a particular record.

Private Method Summary

void

_do_highlighting( &$attrs)

Set color for a cell if the current cursor position is highlighted.
void

_add_context(object event &$element)

Add context info to event.
void

_new_formtoken(object event $view, object _form_element $element)

Create new name for a form element.
void

_inputline( $type, $field, $maxlen)

Warning: documentation is missing.
void

select_string( $field, $optionlist, boolean $use_stringkey)

Warning: documentation is missing.
void

_looselink( $label, $view, string $fakename)

Warning: documentation is missing.
void

image( $label, $src)

Warning: documentation is missing.
void

image_link( $label, $src, $event)

Warning: documentation is missing.

Public Field Summary

object application

$application

Reference to application that uses this instance.
object widget_set

$widgets

Reference to widget set.
array

$raw_views

Array of event handlers that open a document header or footer on
array

$highlight

Positions and colors of records to highlight. The array contains
array

$record_cache

Cached cursor values. The array contains the keyed by context cursor id.
boolean

$no_update

Don't generate a form in next open_source.

Private Field Summary

object _admin_panel_view

$v

Reference to current context object.
integer

$_form_index

Index of last form. The first form has index 1.
string

$_form_filter

Name of form filter to save in created _form_element objects.
array

$_viewstack

Context stack.
integer

$_openform

Number of opened forms.
integer

$_opentable

Number of open tables.
integer

$_openrow

Number of open rows.
integer

$_opencells

Number of open cells.
boolean

$_anchor

Use anchors in links when set to 'true'.
integer

$_anchors

Number of set anchors.

Private Constant Summary

_ADMIN_PANEL_CLASS >>true<< Warning: documentation is missing.

Public Method Details

admin_panel

public void admin_panel( object application &$app, [ integer $widgets ] )

  Initialise everything.

Parameter
object application &$app
integer $widgets = >>0<<
Returns void


close

public void close( )

  Finish HTML document and exit.

Returns void


&instance

public object admin_panel &instance( )

  Get reference to the one and only instance of this class.

Warning: documentation is missing.

Returns object admin_panel


open_context

public void open_context( object cursor &$cursor )

  Open a new context.

Parameter
object cursor &$cursor
Returns void


close_context

public void close_context( )

  Return to former context.

Returns void


use_filter

public void use_filter( string $filtername )

  Set form filter function.
Filters are used indepently from the context.

Parameter
string $filtername
Name of the filter function.
Returns void


&get_cursor

public object cursor &get_cursor( )

  Get the cursor used in the current context.

Returns object cursor


clear_record_cache

public void clear_record_cache( )

  Clear the record cache.

Returns void


value

public void value( string $field_name )

  Get a field from a record the current context points to.
If there's a value stored in the record cache it is returned instead.

Parameter
string $field_name
Returns void


set_value

public void set_value( string $field, mixed $val )

  Set a field in the record cache.

Parameter
string $field
Field name.
mixed $val
New value to set.
Returns void


header

public void header( string $header, [ string $comp ] )

  Print document header.

Parameter
string $header
string $comp = >>''<<
Copyright and/or version info.
Returns void


headline

public void headline( string $text )

  Print a headline.

Parameter
string $text
Returns void


msgbox

public void msgbox( string $message, [ integer $color ] )

  Print an informal message box.

Parameter
string $message
integer $color = >>0<<
Color in HTML attribute format.
Returns void


panic

public void panic( string $message )

  Print error message and die.

Parameter
string $message
Returns void


confirm

public void confirm( string $msg, string $option_yes, object event $event_yes, string $option_no, object event $event_no, [ integer $color ] )

  Print confirmation box.

Parameter
string $msg
Question to the user.
string $option_yes
Label for confirming option.
object event $event_yes
Event to trigger for confirming option.
string $option_no
Label for non-confirming option.
object event $event_no
Event to trigger for non-confirming option.
integer $color = >>0<<
Color for question in HTML attribute format.
Returns void


set_default_formevent

public void set_default_formevent( object event $event )

  Set default form event for current context.

Parameter
object event $event
Returns void


open_form

public void open_form( [ integer $default_event ] )

  Open form that is posted to form parser form_parser().

Parameter
integer $default_event = >>0<<
Default form event used when form is posted without submit
button.
Returns void


close_form

public void close_form( )

  Close an opened form.
This function dies if there's no opened form.

Returns void


open_table

public void open_table( integer $attrs )

  Open a table.

Parameter
integer $attrs
Warning: documentation is missing.
Returns void


close_table

public void close_table( )

  Close an opened table.
This function dies if there's no opened table.

Returns void


open_row

public void open_row( integer $attrs )

  Open a row.

Parameter
integer $attrs
Warning: documentation is missing.
Returns void


close_row

public void close_row( )

  Close an opened row.
This function dies if there's no opened row.

Returns void


open_cell

public void open_cell( integer $attrs )

  Open a cell.

Parameter
integer $attrs
Warning: documentation is missing.
Returns void


close_cell

public void close_cell( )

  Close an opened cell.
This function dies if there's no opened cell.

Returns void


table_headers

public void table_headers( array $titles, integer $attrs )

  Create table header from array of strings.

Parameter
array $titles
Column titles.
integer $attrs
Warning: documentation is missing.
Returns void


show

public void show( string $field )

  Print contents of a record's field.

Parameter
string $field
Field name.
Returns void


show_ref

public void show_ref( string $field, string $source, string $column )

  Create cell with contents of row in a referenced table.

Parameter
string $field
Name of field that references the source.
string $source
Name of table that is references.
string $column
Name of the column in referenced table that is printed.
Returns void


paragraph

public void paragraph( string $html )

  Print a paragraph.
A paragraph reopens a table so one can start with a new number ofcolumns. Outside tables a paragraph is printed.

Parameter
string $html
Warning: documentation is missing.
Returns void


open_widget

public void open_widget( [ string $field, integer $attr ] )

  Open a row and cell for a widget and set the current field.
The field name is used for highlighting.

Parameter
string $field = >>''<<
Currently accessed field.
integer $attr = >>0<<
HTML attributes for the opened cell, keyed by attribute name.
Returns void


close_widget

public void close_widget( )

  Close opened call and row.
The field name for highlighting is reset.

Returns void


print_text

public void print_text( string $text )

  Print text.
Instead of php's echo function print_text() should be used so thewidget set can control the layout.

Parameter
string $text
Returns void


label

public void label( string $text )

  Print label.
This function prints a text which looks different to thatgenerated by print_text() amd should have a descriptive character.

Parameter
string $text
Returns void


show_mime_image

public void show_mime_image( string $field, string $type )

  Print image.

Parameter
string $field
Current record's field that contains the image.
string $type
MIME type of the image.
Returns void


inputline

public void inputline( string $field, integer $maxlen )

  Print an input line.

Parameter
string $field
integer $maxlen
Width of line in number of characters.
Returns void


password

public void password( string $field, integer $maxlen, string $label )

  Print a password line.
The content of the line is never shown.

Parameter
string $field
integer $maxlen
Width of line in number of characters.
string $label
Warning: documentation is missing.
Returns void


radiobox

public void radiobox( string $field, string $label_true, string $label_false, [ mixed $value_true, mixed $value_false ] )

  Print boolean radio box.

Parameter
string $field
string $label_true
Label text for 'true' option.
string $label_false
Label text for 'false' option.
mixed $value_true = >>1<<
Data for 'true' option.
mixed $value_false = >>0<<
Data for 'false' option.
Returns void


select_id

public void select_id( string $field, string $source, string $column, string $id, [ string $where ] )

  Select an entry in a foureign table and store its primary key.

Parameter
string $field
string $source
Name of foureign table.
string $column
Name of column in foureign table that is printed.
string $id
Name of the primary key column.
string $where = >>''<<
WHERE clause to use to select the records from the foureign
table (without WHERE keyword).
Returns void


textarea

public void textarea( string $field, integer $width, integer $height )

  Print textarea.

Parameter
string $field
integer $width
Number of columns.
integer $height
Number of rows.
Returns void


fileform

public void fileform( string $field, [ string $typefield, string $filenamefield ] )

  Print file upload widget.

Parameter
string $field
string $typefield = >>''<<
Name of field that will contain the uploaded file's MIME type.
string $filenamefield = >>''<<
Name of field that will contain the uploaded file's original
file name.
Returns void


checkbox

public void checkbox( string $field, [ integer $event ] )

  Print a checkbox.
Posting a checkbox will result in value 0 or 1 for the field.

Parameter
string $field
integer $event = >>0<<
This is probably unused...
Returns void


reset_button

public void reset_button( [ string $label ] )

  Print a reset button.

Parameter
string $label = >>'reset'<<
Label for the button.
Returns void


submit_name

public string submit_name( [ integer $event ] )

  Get name for a submit button.

Parameter
integer $event = >>0<<
Event to use for the submit button.
Returns string

Form element name.


submit_button

public void submit_button( string $label, [ integer $view ] )

  Print a submit button.

Parameter
string $label
Label for the button.
integer $view = >>0<<
Event to use for the submit button.
Returns void


submit_image

public void submit_image( string $label, string $image, [ integer $view ] )

  Print a submit image.

Parameter
string $label
Label for the button.
string $image
URL to image.
integer $view = >>0<<
Event to use for the submit button.
Returns void


use_anchor

public void use_anchor( )

  Switch on use of anchors.
If a link points to the current event handler, an anchor is usedto scroll to the position of the triggered link.

Returns void


no_anchor

public void no_anchor( )

  Switch off use of anchors.

Returns void


link

public void link( string $label, object event $event, [ string $fakename ] )

  Print a link.

Parameter
string $label
A text for the link.
object event $event
The event that is triggered when the link is invoked.
string $fakename = >>''<<
A fake filename for file downloads.
Returns void


fileurl

public void fileurl( string $source, string $field, string $key, string $mime_type, integer $data )

  # Create a url of a file.

Parameter
string $source
Source/table name of the file.
string $field
Field where the file is stored.
string $key
MIME type of the file.
string $mime_type
Primary key of the record.
integer $data
Warning: documentation is missing.
Returns void


url

public void url( object event &$event )

  Create URL from event object.
This function must be used instead of the application class functions.

Parameter
object event &$event
Event to trigger if URL is invoked.
Returns void


new_formfield

public void new_formfield( string $field, [ integer $event, integer $f ] )

  Create form name for a field in a particular record.

Parameter
string $field
integer $event = >>0<<
Event to trigger if widget is a submit button.
integer $f = >>0<<
For internal use.
Returns void


Private Method Details

_do_highlighting

private void _do_highlighting( &$attrs )

  Set color for a cell if the current cursor position is highlighted.

Parameter
&$attrs
Warning: documentation is missing.
Returns void


_add_context

private void _add_context( object event &$element )

  Add context info to event.

Parameter
object event &$element
Returns void


_new_formtoken

private void _new_formtoken( object event $view, object _form_element $element )

  Create new name for a form element.
This function creates a name containing a token

Parameter
object event $view
XXX &$view would crash.
object _form_element $element
Returns void


_inputline

private void _inputline( $type, $field, $maxlen )

 

Warning: documentation is missing.

Parameter
$type
Warning: documentation is missing.
$field
Warning: documentation is missing.
$maxlen
Warning: documentation is missing.
Returns void


select_string

private void select_string( $field, $optionlist, boolean $use_stringkey )

 

Warning: documentation is missing.

Parameter
$field
Warning: documentation is missing.
$optionlist
Warning: documentation is missing.
boolean $use_stringkey
Warning: documentation is missing.
Returns void


_looselink

private void _looselink( $label, $view, string $fakename )

 

Warning: documentation is missing.

Parameter
$label
Warning: documentation is missing.
$view
Warning: documentation is missing.
string $fakename
Warning: documentation is missing.
Returns void


image

private void image( $label, $src )

 

Warning: documentation is missing.

Parameter
$label
Warning: documentation is missing.
$src
Warning: documentation is missing.
Returns void


image_link

private void image_link( $label, $src, $event )

 

Warning: documentation is missing.

Parameter
$label
Warning: documentation is missing.
$src
Warning: documentation is missing.
$event
Warning: documentation is missing.
Returns void


Public Field Details

$application

public object application $application

>><<

Reference to application that uses this instance.


$widgets

public object widget_set $widgets

>><<

Reference to widget set.


$raw_views

public array $raw_views

>><<

Array of event handlers that open a document header or footer on
their own. The handler names are stores in the keys - the values cancontain anything (preferably a boolean).


$highlight

public array $highlight

>><<

Positions and colors of records to highlight. The array contains
HTML colors keyed by context cursor id.


$record_cache

public array $record_cache

>><<

Cached cursor values. The array contains the keyed by context cursor id.


$no_update

public boolean $no_update

>>false<<

Don't generate a form in next open_source.


Private Field Details

$v

private object _admin_panel_view $v

>><<

Reference to current context object.


$_form_index

private integer $_form_index

>><<

Index of last form. The first form has index 1.


$_form_filter

private string $_form_filter

>>''<<

Name of form filter to save in created _form_element objects.

See Also _new_formtoken()

$_viewstack

private array $_viewstack

>><<

Context stack.

See Also open_context(), close_context()

$_openform

private integer $_openform

>><<

Number of opened forms.


$_opentable

private integer $_opentable

>><<

Number of open tables.


$_openrow

private integer $_openrow

>><<

Number of open rows.


$_opencells

private integer $_opencells

>><<

Number of open cells.


$_anchor

private boolean $_anchor

>>false<<

Use anchors in links when set to 'true'.


$_anchors

private integer $_anchors

>><<

Number of set anchors.


Private Constant Details

_ADMIN_PANEL_CLASS

define( _ADMIN_PANEL_CLASS, >>true<< )
Case: default: case sensitive




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta