ultimix
template_content_view.php
Go to the documentation of this file.
1 <?php
2 
3  /*
4  * This source code is a part of the Ultimix Project.
5  * It is distributed under BSD license. All other third side source code (like tinyMCE) is distributed under
6  * it's own license wich could be found from the corresponding files or sources.
7  * This source code is provided "as is" without any warranties or garanties.
8  *
9  * Have a nice day!
10  *
11  * @url http://ultimix.sorceforge.net
12  *
13  * @author Alexey "gdever" Dodonov
14  */
15 
27 
38  var $BlockSettings = false;
39  var $CachedMultyFS = false;
40  var $Security = false;
42  var $String = false;
43 
54  function __construct()
55  {
56  try
57  {
58  $this->BlockSettings = get_package_object( 'settings::settings' , 'last' , __FILE__ );
59  $this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
60  $this->Security = get_package( 'security' , 'last' , __FILE__ );
61  $this->TemplateContentAccess = get_package( 'page::template_content::template_content_access' );
62  $this->String = get_package( 'string' , 'last' , __FILE__ );
63  }
64  catch( Exception $e )
65  {
66  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
67  }
68  }
69 
88  function pre_generation( $Options )
89  {
90  try
91  {
92  $PageJS = get_package( 'page::page_js' , 'last' , __FILE__ );
93  $PackagePath = _get_package_relative_path_ex(
94  'page::template_content::template_content_view' , 'last'
95  );
96  $PageJS->add_javascript( "{http_host}/$PackagePath/include/js/template_content_view.js" );
97 
98  $Lang = get_package( 'lang' , 'last' , __FILE__ );
99  $Lang->include_strings_js( 'page::template_content::template_content_view' );
100  }
101  catch( Exception $e )
102  {
103  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
104  }
105  }
106 
129  function view( &$Options )
130  {
131  try
132  {
133  if( $Options->get_setting( 'template' , false ) === false )
134  {
135  $ContextSet = get_package( 'gui::context_set' , 'last' , __FILE__ );
136 
137  $ContextSet->execute( $Options , $this , __FILE__ );
138 
139  return( $this->Output );
140  }
141  else
142  {
143  return( $this->TemplateContentAccess->get_content_ex( $Options ) );
144  }
145  }
146  catch( Exception $e )
147  {
148  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
149  }
150  }
151  }
152 
153 ?>