ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
default_views_utilities_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| set_constants (&$ContextSet, &$Options)
| apply_posted_data_for_create_form (&$Options, $Form)
| compile_form (&$Options, $Form, $IdList=false)
| construct_paging (&$Options, &$Paging)
| get_template (&$Options, $TemplateName)

## Data Fields
| $CachedMultyFS = false
| $ContextSetUtilities = false
| $Search = false
| $Security = false
| $Settings = false
| $String = false
| $Prefix = false
| $Provider = false
| $ContextSet = false
| $QueryString = '1 = 1'

## Detailed Description

Class of the default views.

Author
  Dodonov A.A.

Definition at line 26 of file default_views_utilities.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 107 of file default_views_utilities.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->ContextSetUtilities = get_package(
'gui::context_set::context_set_utilities' , 'last' , __FILE__
);
$this->Search = get_package( 'search' , 'last' , __FILE__ );
$this->Security = get_package( 'security' , 'last' , __FILE__ );
$this->Settings = get_package_object( 'settings::settings' , 'last' , __FILE__ );
$this->String = get_package_object( 'settings::settings' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

apply_posted_data_for_create_form | ( | & | $Options,
|  |  | $Form
| ) |  |

Function draws posted data.

Parameters

  $Options | - Execution parameters.
  $Form | - Form code.

Returns
  Form code.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 188 of file default_views_utilities.php.

{
try
{
if( $Options->get_setting( 'get_post_extraction_script' , false ) )
{
$ExtractionScript = $Options->get_setting( 'get_post_extraction_script' );
$SecurityParser = get_package( 'security::security_utilities' , 'last' , __FILE__ );
$Record = $SecurityParser->parse_http_parameters( $ExtractionScript );
$Form = $this->String->print_record( $Form , $Record );
}
return( $Form );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_form | ( | & | $Options,
|  |  | $Form,
|  |  | $IdList = `false`
| ) |  |

Function processes form macroes.

Parameters

  $Options | - Execution parameters.
  $Form | - Form to process.
  $IdList | - Record ids.

Returns
  Processed form.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 325 of file default_views_utilities.php.

{
try
{
if( $IdList !== false )
{
$Record = $this->ContextSetUtilities->get_data_record( $Options , $IdList );
$Record = $this->ContextSetUtilities->extract_data_from_request(
$Options , $Record , 'get_post_extraction_script' , $this->Prefix
);
$Form = $this->ContextSetUtilities->set_form_data( $Form , $Record );
}
if( strpos( $Form , '{prefix}' ) !== false )
{
$Form = str_replace( '{prefix}' , $this->Prefix , $Form );
}
$Changed = false;
$Form = $this->ContextSet->compile_special_macro( $Options , $Form , $Changed );
return( $Form );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

construct_paging | ( | & | $Options,
|  | & | $Paging
| ) |  |

Function constructs list of records.

Parameters

  $Options | - Execution parameters.
  $Paging | - Grid.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 417 of file default_views_utilities.php.

{
try
{
/* Paging primary initialization */
$Paging->set( 'FormId' , $this->Prefix.'_form' );
$Paging->set( 'Prefix' , $this->Prefix );
/* Header buttons creation */
$HeaderFields =
'<input type="hidden" name="{prefix}_context_action" id="{prefix}_context_action" value="">
<input type="hidden" name="{prefix}_action" id="{prefix}_action" value="">
<input type="hidden" name="{prefix}_record_id" id="{prefix}_record_id" value="">';
$Paging->set( 'CustomButtons' , $HeaderFields );
$this->build_query_string( $Options );
$this->set_paging_templates( $Options , $Paging );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

get_template | ( | & | $Options,
|  |  | $TemplateName
| ) |  |

Function returns template.

Parameters

  $Options | - Execution parameters.
  $TemplateName | - Template name.

Returns
  Template.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 469 of file default_views_utilities.php.

{
try
{
$Template = $Options->get_setting( $TemplateName , '' );
if( $Template !== '' )
{
$Template = dirname( $Options->get_setting( 'file_path' ) )."/res/templates/$TemplateName.tpl";
$Template = $this->CachedMultyFS->file_get_contents( $Template );
}
return( $Template );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

set_constants | ( | & | $ContextSet,
|  | & | $Options
| ) |  |

Function sets all necessary parameters.

Parameters

  $ContextSet | - Set of contexts.
  $Options | - Execution parameters.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 148 of file default_views_utilities.php.

{
try
{
$this->Prefix = $ContextSet->Prefix;
$this->Provider = $ContextSet->Provider;
$this->ContextSet = &$ContextSet;
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$CachedMultyFS = false

Cached packages.

Author
  Dodonov A.A.

Definition at line 38 of file default_views_utilities.php.

$ContextSet = false

Set of contexts.

Author
  Dodonov A.A.

Definition at line 79 of file default_views_utilities.php.

$ContextSetUtilities = false

Definition at line 39 of file default_views_utilities.php.

$Prefix = false

Prefix.

Author
  Dodonov A.A.

Definition at line 55 of file default_views_utilities.php.

$Provider = false

Object of the class wich provides all handlers.

Author
  Dodonov A.A.

Definition at line 67 of file default_views_utilities.php.

$QueryString = '1 = 1'

Record selection condition.

Author
  Dodonov A.A.

Definition at line 91 of file default_views_utilities.php.

$Search = false

Definition at line 40 of file default_views_utilities.php.

$Security = false

Definition at line 41 of file default_views_utilities.php.

$Settings = false

Definition at line 42 of file default_views_utilities.php.

$String = false

Definition at line 43 of file default_views_utilities.php.

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

- packages/gui/packages/context_set/packages/default_views/packages/default_views_utilities/default_views_utilities.php