Detailed Description
This class provides component visualisation routine.
- Author
- Dodonov A.A.
Definition at line 26 of file system_structure_view.php.
Constructor & Destructor Documentation
Constructor.
- Author
- Dodonov A.A.
Definition at line 67 of file system_structure_view.php.
{
try
{
$this->Cache =
get_package(
'cache' ,
'last' , __FILE__ );
$this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$this->Security =
get_package(
'security' ,
'last' , __FILE__ );
$this->Settings =
get_package(
'settings::package_settings' ,
'last' , __FILE__ );
$this->PageAccess =
get_package(
'page::page_access' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| compile_map |
( |
|
$RootItem, |
|
|
|
$Items |
|
) |
| |
Function compiles map.
- Parameters
-
| $RootItem | - Root item. |
| $Items | - Map items. |
- Returns
- Map.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 305 of file system_structure_view.php.
{
try
{
$Map = '';
$PageDescription = $this->PageAccess->get_page_description( $RootItem->page );
$Map .= $this->CachedMultyFS->get_template( __FILE__ , 'map_item_start.tpl' ).
( strlen( $RootItem->navigation ) ? $RootItem->navigation :
'{href:tpl=std;page=./'.$RootItem->page.'.html;raw_text='.$PageDescription[ 'title' ].'}' );
$Map .= $this->CachedMultyFS->get_template( __FILE__ , 'map_item_end.tpl' );
return( $Map );
}
catch( Exception $e )
{
}
}
| compile_map_items |
( |
|
$Map, |
|
|
|
$RootItem, |
|
|
|
$Items |
|
) |
| |
Function compiles single level of the map.
- Parameters
-
| $Map | - Map's part. |
| $RootItem | - Root item. |
| $Items | - Map items. |
- Returns
- Map.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 248 of file system_structure_view.php.
{
try
{
$MapPart = '';
foreach( $Items as $i )
{
if( $i->root_page == $RootItem->page && $i->root_page != $i->page )
{
if( $MapPart === '' )
{
$MapPart .= $this->CachedMultyFS->get_template( __FILE__ , 'map_start.tpl' );
}
}
}
if( $MapPart !== '' )
{
$MapPart .= $this->CachedMultyFS->get_template( __FILE__ , 'map_end.tpl' );
}
return( $MapPart );
}
catch( Exception $e )
{
}
}
| draw_bread_crumbs |
( |
& |
$Options | ) |
|
Function draws "bread crumbs".
- Parameters
-
- Returns
- HTML code of the component.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 600 of file system_structure_view.php.
{
try
{
$PageName = $this->Security->get_g( 'page_name' , 'command' );
$Data = $this->Cache->get_data( "bread_crumbs_for_$PageName" );
if( $Data === false )
{
$Str = $this->compile_bread_crumbs( $Options );
$this->Cache->add_data( "bread_crumbs_for_$PageName" , $Str );
$this->Output = $Str;
}
else
{
$this->Output = $Data;
}
}
catch( Exception $e )
{
}
}
Function draws component.
- Parameters
-
- Returns
- HTML code of the компонента.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 351 of file system_structure_view.php.
{
try
{
$Data = $this->Cache->get_data( 'full_map' );
if( $Data === false )
{
$Access =
get_package(
'system_structure::system_structure_access' ,
'last' , __FILE__ );
$Items = $Access->unsafe_select();
$Map = $this->CachedMultyFS->get_template( __FILE__ , 'map_start.tpl' );
$Map .= $this->CachedMultyFS->get_template( __FILE__ , 'map_end.tpl' );
$this->Cache->add_data( 'full_map' , $Map );
$this->Output = $Map;
}
else
{
$this->Output = $Data;
}
}
catch( Exception $e )
{
}
}
| get_item |
( |
|
$Page, |
|
|
|
$Items |
|
) |
| |
Function returns item.
- Parameters
-
| $Page | - Page. |
| $Items | - Map items. |
- Returns
- Item.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 198 of file system_structure_view.php.
{
try
{
foreach( $Items as $i => $v )
{
if( $v->page == $Page )
{
return( $v );
}
}
return( false );
}
catch( Exception $e )
{
}
}
| get_prev_item |
( |
|
$MainItem, |
|
|
|
$Items |
|
) |
| |
Function returns root item.
- Parameters
-
| $MainItem | - Item. |
| $Items | - Map items. |
- Returns
- Root item.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 152 of file system_structure_view.php.
{
try
{
foreach( $Items as $i => $v )
{
if( $v->page == $MainItem->root_page )
{
return( $v );
}
}
return( false );
}
catch( Exception $e )
{
}
}
Function returns root of the map.
- Parameters
-
- Returns
- Root item or false.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 106 of file system_structure_view.php.
{
try
{
foreach( $Items as $i => $v )
{
if( $v->page == $v->root_page )
{
return( $v );
}
}
return( false );
}
catch( Exception $e )
{
}
}
Function draws component.
- Parameters
-
- Returns
- HTML code of the компонента.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 648 of file system_structure_view.php.
{
try
{
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_map' );
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_bread_crumbs' );
$ContextSet->execute( $Options , $this , __FILE__ );
return( $this->Output );
}
catch( Exception $e )
{
}
}
Field Documentation
The documentation for this class was generated from the following file: