Detailed Description
Class processes macro.
- Author
- Dodonov A.A.
Definition at line 26 of file review_markup.php.
Constructor & Destructor Documentation
Constructor.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 57 of file review_markup.php.
{
try
{
$this->ReviewAccess =
get_package(
'review::review_access' ,
'last' , __FILE__ );
$this->ReviewAlgorithms =
get_package(
'review::review_algorithms' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| compile_review_form |
( |
& |
$Settings | ) |
|
Function compiles macro 'review_form'.
- Parameters
-
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 184 of file review_markup.php.
{
try
{
$MasterId = $Settings->get_setting( 'master_id' );
$MasterType = $Settings->get_setting( 'master_type' );
$Code = '{direct_controller:package_name=review::review_controller;meta=meta_create_review;'.
"master_type=$MasterType;master_id=$MasterId;direct_create=1}".
'{direct_view:package_name=review::review_view;meta=meta_create_review_form;'.
"master_type=$MasterType;master_id=$MasterId;direct_create=1}";
return( $Code );
}
catch( Exception $e )
{
}
}
| compile_review_line |
( |
& |
$Settings | ) |
|
Function compiles macro 'review_rank'.
- Parameters
-
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 131 of file review_markup.php.
{
try
{
if( isset( $Reviews[ 0 ] ) )
{
$ReviewLine = '';
$TemplatePath = dirname( __FILE__ ).'/res/templates/default_review_template.tpl';
foreach( $Reviews as $i => $Review )
{
$ReviewLine .= $this->CachedMultyFS->file_get_contents( $TemplatePath );
$ReviewLine = $this->String->print_record( $ReviewLine , $Review );
}
return( $ReviewLine );
}
else
{
return( '{lang:reviews_were_not_found}' );
}
}
catch( Exception $e )
{
}
}
| compile_review_rank |
( |
& |
$Settings | ) |
|
Function compiles macro 'review_rank'.
- Parameters
-
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 226 of file review_markup.php.
{
try
{
$MasterType = $Settings->get_setting( 'master_type' );
$MasterId = $Settings->get_setting( 'master_id' );
return( $this->RankAccess->get_total_rank( $MasterType , $MasterId ) );
}
catch( Exception $e )
{
}
}
| get_reviews_for_object |
( |
& |
$Settings | ) |
|
Function returns all reviews for the object.
- Parameters
-
- Returns
- Reviews object.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 94 of file review_markup.php.
{
try
{
$MasterId = $Settings->get_setting( 'master_id' );
$MasterType = $Settings->get_setting( 'master_type' );
return( $this->ReviewAlgorithms->get_records_for_object( $MasterId , $MasterType ) );
}
catch( Exception $e )
{
}
}
Field Documentation
| $ReviewAlgorithms = false |
The documentation for this class was generated from the following file: