예제 #1
0
 /**
  * @param ENVIRONMENT $env Global environment.
  */
 public function __construct($env)
 {
     $this->inherit_resources_from($env);
     $this->resolve_to_root = $env->resolve_to_root;
     $this->root_url = $env->url(Url_part_path);
     parent::__construct($env);
     $this->is_page = true;
     $this->page = $this;
     $class_name = $this->final_class_name('PAGE_TITLE', 'webcore/gui/page_title.php');
     $this->title = new $class_name($this);
     $class_name = $this->final_class_name('LOCATION_MENU', 'webcore/gui/location_menu.php');
     $this->location = new $class_name($this);
     $this->location->renderer->separator_class = $this->display_options->location_class;
     $this->template_options = new PAGE_TEMPLATE_OPTIONS();
     $this->template_options->show_statistics = $env->debug_enabled && $env->debugging;
     $this->icon_options = new PAGE_ICON_OPTIONS($this);
     $this->refresh_options = new PAGE_REFRESH_OPTIONS($this);
     $this->newsfeed_options = new PAGE_NEWSFEED_OPTIONS($this);
 }
예제 #2
0
 /**
  * @param PAGE $page Page to which this application is attached.
  */
 public function __construct($page)
 {
     $this->page = $page;
     $this->inherit_resources_from($page);
     parent::__construct($page->env);
     $this->mail_options->copy_from($page->mail_options);
     $this->display_options->copy_from($page->display_options);
     $this->database_options->copy_from($page->database_options);
     $this->upload_options->copy_from($page->upload_options);
     $page->add_as_icon_listener_to($this);
     $page->add_icon_alias($this, Folder_name_app_icons);
     $this->set_path(Folder_name_application, '/');
     $this->set_path(Folder_name_functions, '{' . Folder_name_application . '}');
     $this->set_path(Folder_name_attachments, '{' . Folder_name_data . '}attachments');
     $this->set_path(Folder_name_app_icons, '{' . Folder_name_application . '}icons');
     $this->set_path(Folder_name_app_styles, '{' . Folder_name_application . '}styles');
     $this->set_path(Folder_name_app_scripts, '{' . Folder_name_application . '}scripts');
     $this->set_extension(Folder_name_app_styles, 'css');
     $this->set_extension(Folder_name_app_scripts, 'js');
     $this->exception_handler = $page->exception_handler;
     $class_name = $this->final_class_name('APPLICATION_TABLE_NAMES');
     $this->table_names = new $class_name();
     $class_name = $this->final_class_name('APPLICATION_PAGE_NAMES');
     $this->page_names = new $class_name();
     $this->anon_options = new APPLICATION_ANON_OPTIONS();
     $this->user_options = new APPLICATION_USER_OPTIONS();
     $this->max_title_sizes = array();
     $this->_page_templates = array();
 }