ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
paging_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| set ($FieldName, $FieldValue)
| compile_header ()
| compile_footer ()
| draw ($DataToDisplay=false, $Options=false)

## Data Fields
| $Header = ''
| $Footer = ''
| $CallbackFunc = false
| $FormId = false
| $ItemTemplate = ''
| $DataAccessor = false
| $Page = 0
| $PageField = 'page'
| $RecordsPerPage = 20
| $Prefix = 'default'
| $CustomButtons = ''
| $Ajaxed = false
| $FormRequired = true
| $NoDataFoundMessage
| $GridId = false
| $CachedMultyFS = false
| $PagingMarkup = false
| $Security = false
| $Settings = false
| $String = false
| $Utilities = false

## Detailed Description

Definition at line 16 of file paging.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 267 of file paging.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->PagingMarkup = get_package( 'gui::paging::paging_markup' , 'last' , __FILE__ );
$this->Security = get_package( 'security' , 'last' , __FILE__ );
$this->Settings = get_package_object( 'settings::settings' , 'last' , __FILE__ );
$this->String = get_package( 'string' , 'last' , __FILE__ );
$this->Utilities = get_package( 'utilities' , 'last' , __FILE__ );
$this->load_scripts();
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

compile_footer | ( |  | ) |

Function returns code of the control's footer.

Returns
  Control's footer.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 409 of file paging.php.

{
try
{
$this->Footer = str_replace( '{page_name}' , $this->PageField , $this->Footer );
$this->Footer = str_replace( '{records_per_page}' , $this->RecordsPerPage , $this->Footer );
if( $this->FormId !== false && $this->FormRequired )
{
return( $this->Footer.'</form>' );
}
else
{
return( $this->Footer );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_header | ( |  | ) |

Function returns code of the control's header.

Returns
  Control's header.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 366 of file paging.php.

{
try
{
$this->FormRequired = $this->Security->get_gp( 'paging_require_form' , 'integer' , true );
$HiddenFields = $this->compile_hidden_fields();
$HiddenFields = $this->PagingMarkup->compile_sort_link( $this , $HiddenFields );
if( $this->FormRequired )
{
return( '<form id="'.$this->FormId.'" action="" method="post">'.$HiddenFields.$this->Header );
}
else
{
return( $HiddenFields.$this->Header );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

draw | ( |  | $DataToDisplay = `false`,
|  |  | $Options = `false`
| ) |  |

Function draws list of records.

Parameters

  $DataToDisplay | - Data to display.
  $Options | - Additional display options.

Returns
  Component's HTML code.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 679 of file paging.php.

{
try
{
$this->primary_init( $Options );
if( $DataToDisplay === false && $this->DataAccessor === false )
{
throw( new Exception( 'No data was specified' ) );
}
if( $this->DataAccessor )
{
$DataToDisplay = $this->get_data_to_display( $Options );
}
if( count( $DataToDisplay ) === 0 )
{
return( $this->compile_no_data_to_display() );
}
return( $this->compile_macros( $DataToDisplay ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

set | ( |  | $FieldName,
|  |  | $FieldValue
| ) |  |

Function sets field.

Parameters

  $FieldName | - Field name.
  $FieldValue | - Field value.

Author
  Dodonov A.A.

Definition at line 304 of file paging.php.

{
$this->$FieldName = $FieldValue;
}

## Field Documentation

$Ajaxed = false

Ajaxed control or not.

Author
  Dodonov A.A.

Definition at line 160 of file paging.php.

$CachedMultyFS = false

Cached packages.

Author
  Dodonov A.A.

Definition at line 208 of file paging.php.

$CallbackFunc = false

Function processes each outputting row.

Author
  Dodonov A.A.

Definition at line 52 of file paging.php.

$CustomButtons = ''

Custom buttons.

Author
  Dodonov A.A.

Definition at line 148 of file paging.php.

$DataAccessor = false

Object provides data access.

Author
  Dodonov A.A.

Definition at line 88 of file paging.php.

$Footer = ''

Footer.

Author
  Dodonov A.A.

Definition at line 40 of file paging.php.

$FormId = false

Id of the root form.

Author
  Dodonov A.A.

Definition at line 64 of file paging.php.

$FormRequired = true

Should be the generated HTML bounded by 'form' tag.

Author
  Dodonov A.A.

Definition at line 172 of file paging.php.

$GridId = false

Grid's id.

Author
  Dodonov A.A.

Definition at line 196 of file paging.php.

$Header = ''

Header.

Author
  Dodonov A.A.

Definition at line 28 of file paging.php.

$ItemTemplate = ''

Element's template.

Author
  Dodonov A.A.

Definition at line 76 of file paging.php.

$NoDataFoundMessage

Message to output if data was not found.

Author
  Dodonov A.A.

Definition at line 184 of file paging.php.

$Page = 0

Number of page.

Author
  Dodonov A.A.

Definition at line 100 of file paging.php.

$PageField = 'page'

Number of page.

Author
  Dodonov A.A.

Definition at line 112 of file paging.php.

$PagingMarkup = false

Definition at line 209 of file paging.php.

$Prefix = 'default'

Prefix.

Author
  Dodonov A.A.

Definition at line 136 of file paging.php.

$RecordsPerPage = 20

Count of records per page.

Author
  Dodonov A.A.

Definition at line 124 of file paging.php.

$Security = false

Definition at line 210 of file paging.php.

$Settings = false

Definition at line 211 of file paging.php.

$String = false

Definition at line 212 of file paging.php.

$Utilities = false

Definition at line 213 of file paging.php.

The documentation for this class was generated from the following file:

- packages/gui/packages/paging/paging.php