ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
button_markup_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| pre_generation ($Options)
| compile_component_button (&$Settings)
| compile_menu_button (&$Settings)
| compile_toolbar_button (&$Settings)
| compile_toggle_button (&$Settings)
| compile_run_controller_and_remove_dom_button (&$Settings)

## Data Fields
| $Settings = false
| $CachedMultyFS = false
| $PageJS = false
| $String = false
| $Utilities = false

## Detailed Description

Class processes buttons macro.

Author
  Dodonov A.A.

Definition at line 26 of file button_markup.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 55 of file button_markup.php.

{
try
{
$Settings = get_package_object( 'settings::settings' , 'last' , __FILE__ );
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->PageJS = get_package( 'page::page_js' , 'last' , __FILE__ );
$this->String = get_package( 'string' , 'last' , __FILE__ );
$this->Utilities = get_package( 'utilities' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

compile_component_button | ( | & | $Settings | ) |

Function processes macro 'component_button'.

Parameters

  $Str | - String to process.
  $Changed | - true if any of the page's elements was compiled.

Returns
  array( Processed string , Was the string changed ).

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 128 of file button_markup.php.

{
try
{
$Settings->set_undefined( 'label' , 'label' );
$Settings->set_undefined( 'size' , '42' );
$Settings->set_undefined( 'package_version' , 'last' );
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'component_button.tpl' );
$Code = $this->String->print_record( $Code , $Settings->get_raw_settings() );
$Path = $this->Utilities->get_package_path( $Settings );
$Icon = $Settings->get_setting( 'icon' );
$Code = str_replace( '{path_to_image}' , "$Path/res/images/$Icon" , $Code );
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_menu_button | ( | & | $Settings | ) |

Function compiles macro 'menu_button'.

Parameters

  $Settings | - Compilation parameters.

Returns
  HTML code.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 218 of file button_markup.php.

{
try
{
$this->set_default_data_for_toolbar_button( $Settings );
$Icon = $Settings->get_setting( 'icon' );
$Path = $this->Utilities->get_package_path( $Settings );
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'menu_button.tpl' );
$Code = $this->String->print_record( $Code , $Settings->get_raw_settings() );
return( str_replace( '{path_to_image}' , "$Path/res/images/$Icon" , $Code ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_run_controller_and_remove_dom_button | ( | & | $Settings | ) |

Function compiles buttonv.

Parameters

  $Settings | - Parameters.

Returns
  Compiled button.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 400 of file button_markup.php.

{
try
{
$this->set_default_data_for_toolbar_button( $Settings );
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'run_controller_and_remove_dom_button.tpl' );
$Code = $this->String->print_record( $Code , $Settings->get_raw_settings() );
$Path = $this->Utilities->get_package_path( $Settings );
$Code = str_replace( '{path_to_image}' , $Path."/res/images/$Icon" , $Code );
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_toggle_button | ( | & | $Settings | ) |

Function compiles button.

Parameters

  $Settings | - Parameters.

Returns
  Compiled button.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 358 of file button_markup.php.

{
try
{
$this->set_default_data_for_toolbar_button( $Settings );
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'toggle_button.tpl' );
$Code = $this->String->print_record( $Code , $Settings->get_raw_settings() );
$Code = $this->set_toggle_button_icons( $Code , $Settings );
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_toolbar_button | ( | & | $Settings | ) |

Function compiles button.

Parameters

  $Settings | - Parameters.

Returns
  Compiled button.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 262 of file button_markup.php.

{
try
{
$this->set_default_data_for_toolbar_button( $Settings );
$Icon = $Settings->get_setting( 'icon' );
$Path = $this->Utilities->get_package_path( $Settings );
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'toolbar_button.tpl' );
$Code = $this->String->print_record( $Code , $Settings->get_raw_settings() );
$Code = str_replace( '{path_to_image}' , "$Path/res/images/$Icon" , $Code );
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

pre_generation | ( |  | $Options | ) |

Function executes before any page generating actions took place.

Parameters

  $Options | - Settings.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 89 of file button_markup.php.

{
try
{
$Path = "{http_host}/"._get_package_relative_path_ex( 'gui::button_markup' , 'last' );
$this->PageJS->add_javascript( "$Path/include/js/button_markup.js" );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$CachedMultyFS = false

Definition at line 40 of file button_markup.php.

$PageJS = false

Definition at line 41 of file button_markup.php.

$Settings = false

Cached objects.

Author
  Dodonov A.A.

Definition at line 39 of file button_markup.php.

$String = false

Definition at line 42 of file button_markup.php.

$Utilities = false

Definition at line 43 of file button_markup.php.

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

- packages/gui/packages/button_markup/button_markup.php