Detailed Description
Class for rapid buttons creation.
- Author
- Dodonov A.A.
Definition at line 26 of file form_buttons.php.
Constructor & Destructor Documentation
Constructor.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 67 of file form_buttons.php.
{
try
{
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| compile_buttons |
( |
& |
$Settings, |
|
|
& |
$Options, |
|
|
|
$Str |
|
) |
| |
Function creates form buttons.
- Parameters
-
| $Settings | - 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 344 of file form_buttons.php.
{
try
{
$Str = str_replace(
'{prefix}' ,
$Settings->get_setting(
'prefix' ,
'' ) , $Str );
return( $Str );
}
catch( Exception $e )
{
}
}
| compile_cancel |
( |
& |
$Options, |
|
|
|
$Str |
|
) |
| |
Function processes macro 'cancel'.
- Parameters
-
| $Options | - Options of drawing. |
| $Str | - String to process. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 288 of file form_buttons.php.
{
try
{
if( strpos( $Str , '{cancel}' ) !== false )
{
$Str = str_replace( '{cancel}' , '{cancel:p=1}' , $Str );
}
for( ; $Parameters = $this->String->get_macro_parameters( $Str , 'cancel' ) ; )
{
$this->Settings->load_settings( $Parameters );
$Page = $this->get_cancel_page( $Options , $this->Settings );
$Str = str_replace( "{cancel:$Parameters}" , "{href:tpl=std;page=$Page;text=cancel}" , $Str );
}
return( $Str );
}
catch( Exception $e )
{
}
}
| compile_copy |
( |
& |
$Options, |
|
|
|
$Str |
|
) |
| |
Function processes macro 'copy'.
- Parameters
-
| $Options | - Options of drawing. |
| $Str | - String to process. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 201 of file form_buttons.php.
{
try
{
if( strpos( $Str , '{copy}' ) !== false )
{
$Str = str_replace( '{copy}' , '{href:tpl=submit0;form_id={prefix}_copy_form;text=save}' ,$Str );
}
return( $Str );
}
catch( Exception $e )
{
}
}
| compile_create |
( |
& |
$Options, |
|
|
|
$Str |
|
) |
| |
Function processes macro 'create'.
- Parameters
-
| $Options | - Options of drawing. |
| $Str | - String to process. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 106 of file form_buttons.php.
{
try
{
if( strpos( $Str , '{create}' ) !== false )
{
$Str = str_replace( '{create}' , '{create:text=create}' ,$Str );
}
for( ; $Parameters = $this->String->get_macro_parameters( $Str , 'create' ) ; )
{
$this->Settings->load_settings( $Parameters );
$Text = $this->Settings->get_setting( 'text' , 'create' );
$Code = "{href:tpl=submit0;form_id={prefix}_create_form;text=$Text}";
$Str = str_replace( "{create:$Parameters}" , $Code , $Str );
}
return( $Str );
}
catch( Exception $e )
{
}
}
| compile_save |
( |
& |
$Options, |
|
|
|
$Str |
|
) |
| |
Function processes macro 'save'.
- Parameters
-
| $Options | - Options of drawing. |
| $Str | - String to process. |
- Returns
- HTML code to display.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 158 of file form_buttons.php.
{
try
{
if( strpos( $Str , '{save}' ) !== false )
{
$Str = str_replace( '{save}' , '{href:tpl=submit0;form_id={prefix}_update_form;text=save}' ,$Str );
}
return( $Str );
}
catch( Exception $e )
{
}
}
Field Documentation
The documentation for this class was generated from the following file: