Public Member Functions |
| | __construct () |
| | get_common_button_content (&$CommonStateConfig, &$ExtOptions, $Name) |
| | get_config (&$ContextSetConfig, &$Options, $Name) |
| | compile_search_button (&$ContextSetConfig, &$Options, $Code) |
| | compile_create_button (&$ContextSetConfig, &$Options, $Code) |
| | compile_update_button (&$ContextSetConfig, &$Options, $Code) |
| | compile_copy_button (&$ContextSetConfig, &$Options, $Code) |
| | compile_delete_button (&$ContextSetConfig, &$Options, $Code) |
| | compile_buttons (&$ContextSetConfig, &$Options, $Str) |
Detailed Description
Class for rapid buttons creation.
- Author
- Dodonov A.A.
Definition at line 26 of file common_buttons.php.
Constructor & Destructor Documentation
Constructor.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 70 of file common_buttons.php.
{
try
{
$this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$PackageName = 'gui::context_set::context_set_configs';
$this->ContextSetConfigs =
get_package( $PackageName ,
'last' , __FILE__ );
$this->PermitAlgorithms =
get_package(
'permit::permit_algorithms' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
$this->Trace =
get_package(
'trace' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| compile_buttons |
( |
& |
$ContextSetConfig, |
|
|
& |
$Options, |
|
|
|
$Str |
|
) |
| |
Method creates buttons.
- Parameters
-
| $ContextSetConfig | - Options of context_set. |
| $Options | - Options of drawing. |
| $Str | - Processing string. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 531 of file common_buttons.php.
{
try
{
$this->Trace->start_group( 'compile_buttons' );
$this->Trace->end_group();
$Str = str_replace( '{prefix}' , $ContextSetConfig->get_setting( 'prefix' , '' ) , $Str );
return( $Str );
}
catch( Exception $e )
{
}
}
| compile_copy_button |
( |
& |
$ContextSetConfig, |
|
|
& |
$Options, |
|
|
|
$Code |
|
) |
| |
Function processes macro 'copy_button' in a string.
- Parameters
-
| $ContextSetConfig | - Set of contexts settings. |
| $Options | - Options of drawing. |
| $Code | - Processing string. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 433 of file common_buttons.php.
{
try
{
if( strpos( $Code , chr( 123 ).'copy_button' ) === false )
{
return( $Code );
}
$Config = $this->
get_config( $ContextSetConfig , $Options ,
'copy_form' );
return( $this->compile_button( $Config , $Code , 'copy' ) );
}
catch( Exception $e )
{
}
}
| compile_create_button |
( |
& |
$ContextSetConfig, |
|
|
& |
$Options, |
|
|
|
$Code |
|
) |
| |
Function processes string.
- Parameters
-
| $ContextSetConfig | - Set of contexts settings. |
| $Options | - Options of drawing. |
| $Code | - Processing string. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 335 of file common_buttons.php.
{
try
{
if( strpos( $Code , chr( 123 ).'create_button' ) === false )
{
return( $Code );
}
$Config = $this->
get_config( $ContextSetConfig , $Options ,
'create_form' );
return( $this->compile_button( $Config , $Code , 'create' ) );
}
catch( Exception $e )
{
}
}
| compile_delete_button |
( |
& |
$ContextSetConfig, |
|
|
& |
$Options, |
|
|
|
$Code |
|
) |
| |
Function processes string.
- Parameters
-
| $ContextSetConfig | - Set of contexts settings. |
| $Options | - Options of drawing. |
| $Code | - Processing string. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 482 of file common_buttons.php.
{
try
{
if( strpos( $Code , chr( 123 ).'delete_button' ) === false )
{
return( $Code );
}
$Config = $this->
get_config( $ContextSetConfig , $Options ,
'delete_button' );
return( $this->compile_button( $Config , $Code , 'delete' ) );
}
catch( Exception $e )
{
}
}
| compile_search_button |
( |
& |
$ContextSetConfig, |
|
|
& |
$Options, |
|
|
|
$Code |
|
) |
| |
Function processes string.
- Parameters
-
| $ContextSetConfig | - Set of contexts settings. |
| $Options | - Options of drawing. |
| $Code | - Processing string. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 223 of file common_buttons.php.
{
try
{
if( strpos( $Code , chr( 123 ).'search_button' ) === false )
{
return( $Code );
}
$Config = $this->
get_config( $ContextSetConfig , $Options ,
'search_form' );
$ExtOptions = false;
$Code = str_replace(
'{search_button}' ,
);
return( $Code );
}
catch( Exception $e )
{
}
}
| compile_update_button |
( |
& |
$ContextSetConfig, |
|
|
& |
$Options, |
|
|
|
$Code |
|
) |
| |
Function processes string.
- Parameters
-
| $ContextSetConfig | - Set of contexts settings. |
| $Options | - Options of drawing. |
| $Code | - Processing string. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 384 of file common_buttons.php.
{
try
{
if( strpos( $Code , chr( 123 ).'update_button' ) === false )
{
return( $Code );
}
$Config = $this->
get_config( $ContextSetConfig , $Options ,
'update_form' );
return( $this->compile_button( $Config , $Code , 'update' ) );
}
catch( Exception $e )
{
}
}
| get_common_button_content |
( |
& |
$CommonStateConfig, |
|
|
& |
$ExtOptions, |
|
|
|
$Name |
|
) |
| |
Function returns code of the create button.
- Parameters
-
| $CommonStateConfig | - State's config. |
| $ExtOptions | - Additional settings. |
| $Name | - Button name. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 118 of file common_buttons.php.
{
try
{
$PermitsFilter = $CommonStateConfig->get_setting( 'permits_filter' , 'admin' );
$ValidatingPermits = $CommonStateConfig->get_setting( 'permits_validation' , $PermitsFilter );
$PermitValidationResult = $this->PermitAlgorithms->object_has_all_permits(
false , 'user' , $ValidatingPermits
);
if( $PermitValidationResult )
{
$ButtonCode = $this->CachedMultyFS->get_template( __FILE__ , 'toolbar_'.$Name.'_button.tpl' );
return( $ButtonCode );
}
return( '' );
}
catch( Exception $e )
{
}
}
| get_config |
( |
& |
$ContextSetConfig, |
|
|
& |
$Options, |
|
|
|
$Name |
|
) |
| |
Fetching config.
- Parameters
-
| $ContextSetConfig | - Set of contexts settings. |
| $Options | - Options of drawing. |
| $Name | - State name. |
- Returns
- Config content.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 176 of file common_buttons.php.
{
try
{
$Config = $this->ContextSetConfigs->load_common_state_config(
$ContextSetConfig , 'common_state_config_'.$Name , 'cfcxs_'.$Name ,
$Options->get_setting( 'file_path' )
);
return( $Config );
}
catch( Exception $e )
{
}
}
Field Documentation
| $ContextSetConfigs = false |
| $PermitAlgorithms = false |
The documentation for this class was generated from the following file: