ultimix
checkbox_markup_1_0_0 Class Reference

Public Member Functions

 __construct ()
 compile_header_checkbox (&$Settings)
 compile_item_checkbox (&$Settings)
 compile_checkbox_set (&$Settings)
 compile_checkbox (&$Settings)
 compile_checkbox_ex (&$Settings)

Data Fields

 $CachedMultyFS = false
 $Database = false
 $Security = false
 $String = false

Detailed Description

Class processes checkbox macro.

Author
Dodonov A.A.

Definition at line 26 of file checkbox_markup.php.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Author
Dodonov A.A.

Definition at line 54 of file checkbox_markup.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->Database = get_package( 'database' , 'last' , __FILE__ );
$this->Security = get_package( 'security' , 'last' , __FILE__ );
$this->String = get_package( 'string' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Member Function Documentation

compile_checkbox ( $Settings)

Function compiles macro 'checkbox'.

Parameters
$Settings- Parameters.
Returns
HTML code.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 319 of file checkbox_markup.php.

{
try
{
$Settings->set_undefined( 'default' , 0 );
$Settings->set_undefined( 'id' , md5( microtime() ) );
$Settings->set_undefined( 'label' , '' );
$Type = $Settings->get_setting( 'type' , 'double' );
$Code = $this->CachedMultyFS->get_template( __FILE__ , $Type.'_state_checkbox.tpl' );
$Code = $this->String->print_record( $Code , $Settings->get_raw_settings() );
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_checkbox_ex ( $Settings)

Function compiles macro 'checkbox_ex'.

Parameters
$Settings- Parameters.
Returns
HTML code.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 405 of file checkbox_markup.php.

{
try
{
$SelfClass = $Settings->get_setting( 'self_class' , false );
$Sel = $this->compile_selectors( $Settings );
$Id = $Settings->get_setting( 'id' , '' );
$Name = $Settings->get_setting( 'name' );
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'checkbox_ex.tpl' );
$PlaceHolders = array( '{id}' , '{name}' , '{self_class}' , '{selector}' );
$Data = array( $Id , $Name , $SelfClass , $Sel );
$Code = str_replace( $PlaceHolders , $Data , $Code );
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_checkbox_set ( $Settings)

Function compiles macro 'checkboxset'.

Parameters
$Settings- Parameters.
Returns
HTML code.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 276 of file checkbox_markup.php.

{
try
{
$Cols = $Settings->get_setting( 'cols' , 3 );
$Value = $Settings->get_setting( 'checked_all' , '0' ) == '0' ? 'off' : 'on';
$Query = $Settings->get_setting( 'query' );
$this->Database->query_as( DB_OBJECT );
$Records = $this->Database->query( $Query );
$Records = $this->Database->fetch_results( $Records );
$Code = $this->compile_records( $Cols , $Value , $Records );
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_header_checkbox ( $Settings)

Function compiles macro 'item_checkbox'.

Parameters
$Settings- Parameters.
Returns
HTML code.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 91 of file checkbox_markup.php.

{
try
{
$Name = $Settings->get_setting( 'name' );
$Code = '{checkbox_ex:self_class=_'.$Name.'_header_checkbox;children_selector=._'.
$Name."_item_checkbox;name=$Name}";
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_item_checkbox ( $Settings)

Function compiles macro 'item_checkbox'.

Parameters
$Settings- Parameters.
Returns
HTML code.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 130 of file checkbox_markup.php.

{
try
{
$Name = $Settings->get_setting( 'name' );
$Id = $Settings->get_setting( 'id' );
$Code = '{checkbox_ex:self_class=_'.$Name.'_item_checkbox;parent_selector=._'.$Name.
"_header_checkbox;id=_id_$Id;name=_id_$Id}";
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Field Documentation

$CachedMultyFS = false

Cached objects.

Author
Dodonov A.A.

Definition at line 39 of file checkbox_markup.php.

$Database = false

Definition at line 40 of file checkbox_markup.php.

$Security = false

Definition at line 41 of file checkbox_markup.php.

$String = false

Definition at line 42 of file checkbox_markup.php.


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