File indexing completed on 2025-05-04 05:29:12
0001 <?php 0002 0003 /** 0004 * ocs-webserver 0005 * 0006 * Copyright 2016 by pling GmbH. 0007 * 0008 * This file is part of ocs-webserver. 0009 * 0010 * This program is free software: you can redistribute it and/or modify 0011 * it under the terms of the GNU Affero General Public License as 0012 * published by the Free Software Foundation, either version 3 of the 0013 * License, or (at your option) any later version. 0014 * 0015 * This program is distributed in the hope that it will be useful, 0016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0018 * GNU Affero General Public License for more details. 0019 * 0020 * You should have received a copy of the GNU Affero General Public License 0021 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0022 * 0023 * Created: 13.09.2017 0024 */ 0025 class Default_Model_ConfigStore 0026 { 0027 0028 /** 0029 * @inheritDoc 0030 */ 0031 public $store_id; 0032 public $host; 0033 public $name; 0034 public $config_id_name; 0035 public $mapping_id_name; 0036 public $order; 0037 public $is_client; 0038 public $google_id; 0039 public $piwik_id; 0040 public $package_type; 0041 public $cross_domain_login; 0042 public $is_show_title; 0043 public $is_show_home; 0044 public $is_show_git_projects; 0045 public $is_show_blog_news; 0046 public $is_show_forum_news; 0047 public $is_show_in_menu; 0048 public $is_show_real_domain_as_url; 0049 public $layout_home; 0050 public $layout_explore; 0051 public $layout_pagedetail; 0052 public $layout; 0053 public $render_view_postfix; 0054 public $stay_in_context; 0055 public $created_at; 0056 public $changed_at; 0057 public $deleted_at; 0058 public $browse_list_type; 0059 0060 public function __construct($storeHostName) 0061 { 0062 $storeConfigArray = Zend_Registry::get('application_store_config_list'); 0063 if (isset($storeConfigArray[$storeHostName])) { 0064 $storeConfig = $storeConfigArray[$storeHostName]; 0065 $this->store_id = $storeConfig['store_id']; 0066 $this->host = $storeConfig['host']; 0067 $this->name = $storeConfig['name']; 0068 $this->config_id_name = $storeConfig['config_id_name']; 0069 $this->mapping_id_name = $storeConfig['mapping_id_name']; 0070 $this->order = $storeConfig['order']; 0071 $this->is_client = $storeConfig['is_client']; 0072 $this->google_id = $storeConfig['google_id']; 0073 $this->piwik_id = $storeConfig['piwik_id']; 0074 $this->package_type = $storeConfig['package_type']; 0075 $this->cross_domain_login = $storeConfig['cross_domain_login']; 0076 $this->is_show_title = $storeConfig['is_show_title']; 0077 $this->is_show_home = $storeConfig['is_show_home']; 0078 $this->is_show_git_projects = $storeConfig['is_show_git_projects']; 0079 $this->is_show_blog_news = $storeConfig['is_show_blog_news']; 0080 $this->is_show_forum_news = $storeConfig['is_show_forum_news']; 0081 $this->is_show_in_menu = $storeConfig['is_show_in_menu']; 0082 $this->is_show_real_domain_as_url = $storeConfig['is_show_real_domain_as_url']; 0083 $this->layout_home = $storeConfig['layout_home']; 0084 $this->layout_explore = $storeConfig['layout_explore']; 0085 $this->layout_pagedetail = $storeConfig['layout_pagedetail']; 0086 $this->layout = $storeConfig['layout']; 0087 $this->render_view_postfix = $storeConfig['render_view_postfix']; 0088 $this->stay_in_context = $storeConfig['stay_in_context']; 0089 $this->created_at = $storeConfig['created_at']; 0090 $this->changed_at = $storeConfig['changed_at']; 0091 $this->deleted_at = $storeConfig['deleted_at']; 0092 $this->browse_list_type = $storeConfig['browse_list_type']; 0093 } else { 0094 Zend_Registry::get('logger')->warn(__METHOD__ . '(' . __LINE__ . ') - ' . $host 0095 . ' :: no domain config context configured') 0096 ; 0097 } 0098 } 0099 0100 /** 0101 * @return bool 0102 */ 0103 public function isShowHomepage() 0104 { 0105 return $this->is_show_home == 1 ? true : false; 0106 } 0107 0108 /** 0109 * @return bool 0110 */ 0111 public function isRenderReact() 0112 { 0113 return $this->render_view_postfix == 'react' ? true : false; 0114 } 0115 0116 }