Detailed Description
This manager helps creating content.
- Author
- Dodonov A.A.
Definition at line 26 of file content_view.php.
Constructor & Destructor Documentation
Constructor.
- Author
- Dodonov A.A.
Definition at line 68 of file content_view.php.
{
try
{
$this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$this->ContentAccess =
get_package(
'content::content_access' ,
'last' , __FILE__ );
$this->ContentAlgorithms =
get_package(
'content::content_algorithms' ,
'last' , __FILE__ );
$this->PageMeta =
get_package(
'page::page_meta' ,
'last' , __FILE__ );
$this->Security =
get_package(
'security' ,
'last' , __FILE__ );
$this->Settings =
get_package(
'settings::package_settings' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| compile_view_content |
( |
|
$ContentId | ) |
|
Function draws component.
- Parameters
-
- Returns
- Content.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 565 of file content_view.php.
{
try
{
$Content = $this->ContentAlgorithms->get_by_id( $ContentId );
$Template = $this->CachedMultyFS->get_template( __FILE__ , 'content_view_template.tpl' );
$Output = $this->String->print_record( $Template , $Content );
$this->PageMeta->set_page_title(
get_field( $Content ,
'title' ) );
$this->PageMeta->add_page_keywords(
get_field( $Content ,
'keywords' ) );
$this->PageMeta->add_page_description(
get_field( $Content ,
'description' ) );
}
catch( Exception $e )
{
}
}
| content_archive |
( |
& |
$Options | ) |
|
Function draws component.
- Parameters
-
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 522 of file content_view.php.
{
try
{
$CategoryAccess =
get_package(
'category::category_algorithms' ,
'last' , __FILE__ );
$CategoryIds = $CategoryAccess->get_category_ids(
$Options->get_setting( 'category' , 'news,article,faq,blog' )
);
$PublicationStructure = $this->ContentAccess->get_publication_structure( $CategoryIds );
$Years = array_unique(
get_field_ex( $PublicationStructure ,
'publication_year' ) );
$this->compile_years( $PublicationStructure , $Years , $CategoryIds );
}
catch( Exception $e )
{
}
}
| pre_generation |
( |
& |
$Options | ) |
|
Function executes before any page generating actions took place.
- Parameters
-
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 104 of file content_view.php.
{
try
{
$PageCSS =
get_package(
'page::page_css' ,
'last' , __FILE__ );
$PageCSS->add_stylesheet( "{http_host}/$PackagePath/res/css/content.css" );
}
catch( Exception $e )
{
}
}
| select_content_line_items |
( |
|
$Start, |
|
|
|
$Limit, |
|
|
|
$Field, |
|
|
|
$Order, |
|
|
|
$Condition, |
|
|
& |
$Options |
|
) |
| |
Function returns list of records.
- Parameters
-
| $Start | - Number of the first record. |
| $Limit | - Count of records limitation. |
| $Field | - Field to sort by. |
| $Order | - Sorting order. |
| $Condition | - Additional condtions. |
| $Options | - Additional options. |
- Returns
- List of records.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 204 of file content_view.php.
{
try
{
$Category =
get_package(
'category::category_algorithms' ,
'last' , __FILE__ );
$CategoryNames = $this->get_category_names( $Options );
$CategoryIds = $Category->get_category_ids( $CategoryNames );
return(
$this->ContentAccess->select(
$Start , $Options->get_setting( 'display_limit' , $Limit ) , $Field , $Order ,
"( $Condition ) AND category IN ( ".implode( ' , ' , $CategoryIds ).' )'
)
);
}
catch( Exception $e )
{
}
}
Function draws component.
- Parameters
-
- Returns
- HTML code of the component.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 643 of file content_view.php.
{
try
{
$Path = dirname( __FILE__ );
$ContextSet->add_context( "$Path/conf/cfcxs_content_line" );
$ContextSet->add_context( "$Path/conf/cfcxs_content_view" );
$ContextSet->add_context( "$Path/conf/cfcxs_content_archive" );
$ContextSet->execute( $Options , $this , __FILE__ );
return( $this->Output );
}
catch( Exception $e )
{
}
}
Function draws component.
- Parameters
-
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 603 of file content_view.php.
{
try
{
if( ( $ContentId = $this->Security->get_gp( 'content_id' , 'integer' , false ) ) === false )
{
$this->Output = '{lang:exact_content_was_not_found}';
return;
}
}
catch( Exception $e )
{
}
}
Field Documentation
| $ContentAlgorithms = false |
Display function's result.
- Author
- Dodonov A.A.
Definition at line 38 of file content_view.php.
The documentation for this class was generated from the following file: