ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
category_markup_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| compile_category (&$Settings)
| compile_category_id (&$Settings)
| compile_category_siblings_ids (&$Settings)
| compile_category_name (&$Settings)

## Data Fields
| $CachedMultyFS = false
| $CategoryAccess = false
| $CategoryAlgorithms = false
| $CategoryView = false
| $String = false

## Detailed Description

Processing macroes.

Author
  Dodonov A.A.

Definition at line 26 of file category_markup.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 54 of file category_markup.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->CategoryAccess = get_package( 'category::category_access' , 'last' , __FILE__ );
$this->CategoryAlgorithms = get_package( 'category::category_algorithms' , 'last' , __FILE__ );
$this->CategoryView = get_package( 'category::category_view' , '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_category | ( | & | $Settings | ) |

Function returns select code.

Parameters

  $Settings | - Parameters.

Returns
  Code of the select.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 137 of file category_markup.php.

{
try
{
list( $Name , $Default , $Class ) = $Settings->get_settings(
'name,default,class' , 'category,0,width_160 flat'
);
$Default = $Default == 0 ? '' : "default=$Default;";
$NullCategory = $this->get_null_category( $Settings );
$Id = $this->CategoryView->get_category_id( $Settings );
$Value = $Settings->get_setting( 'value' , false );
$Code = "{select:$Default"."class=$Class;name=$Name;query=$NullCategory SELECT id , title as ".
"`value` FROM umx_category WHERE direct_category![eq]id AND direct_category IN ( $Id )".
( $Value ? ";value=$Value" : '' )."}";
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_category_id | ( | & | $Settings | ) |

Function processes macro 'category_id'.

Parameters

  $Settings | - Options of processing.

Returns
  List of ids.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 184 of file category_markup.php.

{
try
{
$Names = $Settings->get_setting( 'names' , '' );
$Names = $Settings->get_setting( 'name' , $Names );
$Ids = implode( ',' , $this->CategoryAlgorithms->get_category_ids( $Names ) );
return( $Ids );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_category_name | ( | & | $Settings | ) |

Function processes macro 'category_name'.

Parameters

  $Settings | - Options of processing.

Returns
  Category name.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 262 of file category_markup.php.

{
try
{
$Category = $this->CategoryAlgorithms->get_by_id( $Settings->get_setting( 'id' ) );
$Title = get_field( $Category , 'title' );
return( $Title );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_category_siblings_ids | ( | & | $Settings | ) |

Function processes macro 'category_siblings_ids'.

Parameters

  $Settings | - Options of processing.

Returns
  Ids.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 224 of file category_markup.php.

{
try
{
$CategoryId = $Settings->get_setting( 'id' );
$SiblingsIds = implode( ',' , $this->CategoryAccess->get_siblings_ids( $CategoryId ) );
return( $SiblingsIds );
}
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 38 of file category_markup.php.

$CategoryAccess = false

Definition at line 39 of file category_markup.php.

$CategoryAlgorithms = false

Definition at line 40 of file category_markup.php.

$CategoryView = false

Definition at line 41 of file category_markup.php.

$String = false

Definition at line 42 of file category_markup.php.

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

- packages/category/packages/category_markup/category_markup.php