var/cache/website/dev/sulu/websiteWebspaceCollectionCache.php line 23

  1. <?php
  2. use Sulu\Component\Localization\Localization;
  3. use Sulu\Component\Webspace\Manager\WebspaceCollection;
  4. use Sulu\Component\Webspace\Portal;
  5. use Sulu\Component\Webspace\PortalInformation;
  6. use Sulu\Component\Webspace\Environment;
  7. use Sulu\Component\Webspace\Security;
  8. use Sulu\Component\Webspace\Segment;
  9. use Sulu\Component\Webspace\Url;
  10. use Sulu\Component\Webspace\CustomUrl;
  11. use Sulu\Component\Webspace\Webspace;
  12. use Sulu\Component\Webspace\Navigation;
  13. use Sulu\Component\Webspace\NavigationContext;
  14. /**
  15. * websiteWebspaceCollectionCache
  16. *
  17. * DO NOT EDIT
  18. * This file is autogenerated by the Sulu Webspace component
  19. */
  20. class websiteWebspaceCollectionCache extends WebspaceCollection
  21. {
  22. public function __construct()
  23. {
  24. $webspaceRefs = array();
  25. $portalRefs = array();
  26. $localizationRefs = array();
  27. $segmentRefs = array();
  28. $portalInformationRefs = array();
  29. // new webspace
  30. $webspace = new Webspace();
  31. $webspace->setKey('pqna');
  32. $webspace->setName("pqn-a.fr");
  33. $security = new Security();
  34. $security->setSystem('Website');
  35. $security->setPermissionCheck(false);
  36. $webspace->setSecurity($security);
  37. // add localization to webspace
  38. $localization0 = new Localization('fr', '');
  39. $localization0->setShadow('');
  40. $localization0->setDefault(true);
  41. $localization0->setXDefault('');
  42. $localizationRefs['pqna_fr'] = $localization0;
  43. $webspace->addLocalization($localization0);
  44. // add theme
  45. $webspace->addTemplate('search', 'search/search');
  46. $webspace->addTemplate('error', 'error/error');
  47. $webspace->addDefaultTemplate('page', 'pqna');
  48. $webspace->addDefaultTemplate('home', 'pqna');
  49. // add navigation
  50. $navigation = new Navigation();
  51. $navigation->addContext(new NavigationContext('main', array(
  52. 'title' => array(
  53. 'fr' => 'Navigation principale',
  54. )
  55. ,
  56. )
  57. ));
  58. $navigation->addContext(new NavigationContext('footer', array(
  59. 'title' => array(
  60. 'fr' => 'Navigation pied de page',
  61. )
  62. ,
  63. )
  64. ));
  65. $navigation->addContext(new NavigationContext('bottomfooter', array(
  66. 'title' => array(
  67. 'fr' => 'Navigation au plus bas de la page',
  68. )
  69. ,
  70. )
  71. ));
  72. $navigation->addContext(new NavigationContext('aside', array(
  73. 'title' => array(
  74. 'fr' => 'Navigation sur le côté (pour fiche thématique)',
  75. )
  76. ,
  77. )
  78. ));
  79. $navigation->addContext(new NavigationContext('fiche-thematique-ressources', array(
  80. 'title' => array(
  81. 'fr' => '[Fiche thématique] Les ressources',
  82. )
  83. ,
  84. )
  85. ));
  86. $navigation->addContext(new NavigationContext('fiche-thematique-actualites', array(
  87. 'title' => array(
  88. 'fr' => '[Fiche thématique] Les actualités',
  89. )
  90. ,
  91. )
  92. ));
  93. $navigation->addContext(new NavigationContext('fiche-thematique-acteurs', array(
  94. 'title' => array(
  95. 'fr' => '[Fiche thématique] Les acteurs',
  96. )
  97. ,
  98. )
  99. ));
  100. $webspace->setNavigation($navigation);
  101. $webspace->setResourceLocatorStrategy('tree_leaf_edit');
  102. // new portal
  103. $portal = new Portal();
  104. $portal->setName('pqn-a.fr');
  105. $portal->setKey('pqna');
  106. $portal->setWebspace($webspace);
  107. // add localization
  108. $localization = new Localization('fr', '');
  109. $localization->setDefault('1');
  110. $localization->setXDefault('');
  111. $portal->addLocalization($localization);
  112. // add environment
  113. $environment = new Environment();
  114. $environment->setType('prod');
  115. // add environment url
  116. $url = new Url();
  117. $url->setUrl('{host}/{localization}');
  118. $url->setLanguage('fr');
  119. $url->setCountry('');
  120. $url->setSegment('');
  121. $url->setRedirect('');
  122. $url->setMain(true);
  123. $environment->addUrl($url);
  124. $portal->addEnvironment($environment);
  125. // add environment
  126. $environment = new Environment();
  127. $environment->setType('stage');
  128. // add environment url
  129. $url = new Url();
  130. $url->setUrl('{host}/{localization}');
  131. $url->setLanguage('fr');
  132. $url->setCountry('');
  133. $url->setSegment('');
  134. $url->setRedirect('');
  135. $url->setMain(true);
  136. $environment->addUrl($url);
  137. $portal->addEnvironment($environment);
  138. // add environment
  139. $environment = new Environment();
  140. $environment->setType('test');
  141. // add environment url
  142. $url = new Url();
  143. $url->setUrl('{host}/{localization}');
  144. $url->setLanguage('fr');
  145. $url->setCountry('');
  146. $url->setSegment('');
  147. $url->setRedirect('');
  148. $url->setMain(true);
  149. $environment->addUrl($url);
  150. $portal->addEnvironment($environment);
  151. // add environment
  152. $environment = new Environment();
  153. $environment->setType('dev');
  154. // add environment url
  155. $url = new Url();
  156. $url->setUrl('{host}/{localization}');
  157. $url->setLanguage('fr');
  158. $url->setCountry('');
  159. $url->setSegment('');
  160. $url->setRedirect('');
  161. $url->setMain(true);
  162. $environment->addUrl($url);
  163. $portal->addEnvironment($environment);
  164. if (isset($portalRefs['pqna'])) {
  165. throw new \InvalidArgumentException('Portal with key "pqna" already exists in webspace "' . $portalRefs['pqna']->getWebspace()->getKey() . '" and conflicts with webspace "pqna". Portal keys must be unique across all webspaces.');
  166. }
  167. $portalRefs['pqna'] = $portal;
  168. $webspace->addPortal($portal);
  169. $webspaceRefs['pqna'] = $webspace;
  170. $portalInformationRefs['prod']['{host}/fr'] = new PortalInformation(
  171. 1,
  172. $webspaceRefs['pqna'],
  173. $portalRefs['pqna'],
  174. $localizationRefs['pqna_fr'],
  175. '{host}/fr',
  176. null,
  177. null,
  178. true,
  179. '{host}/{localization}',
  180. 5
  181. );
  182. $portalInformationRefs['prod']['{host}'] = new PortalInformation(
  183. 2,
  184. $webspaceRefs['pqna'],
  185. $portalRefs['pqna'],
  186. null,
  187. '{host}',
  188. null,
  189. '{host}/{localization}',
  190. false,
  191. '{host}/{localization}',
  192. 4
  193. );
  194. $portalInformationRefs['stage']['{host}/fr'] = new PortalInformation(
  195. 1,
  196. $webspaceRefs['pqna'],
  197. $portalRefs['pqna'],
  198. $localizationRefs['pqna_fr'],
  199. '{host}/fr',
  200. null,
  201. null,
  202. true,
  203. '{host}/{localization}',
  204. 5
  205. );
  206. $portalInformationRefs['stage']['{host}'] = new PortalInformation(
  207. 2,
  208. $webspaceRefs['pqna'],
  209. $portalRefs['pqna'],
  210. null,
  211. '{host}',
  212. null,
  213. '{host}/{localization}',
  214. false,
  215. '{host}/{localization}',
  216. 4
  217. );
  218. $portalInformationRefs['test']['{host}/fr'] = new PortalInformation(
  219. 1,
  220. $webspaceRefs['pqna'],
  221. $portalRefs['pqna'],
  222. $localizationRefs['pqna_fr'],
  223. '{host}/fr',
  224. null,
  225. null,
  226. true,
  227. '{host}/{localization}',
  228. 5
  229. );
  230. $portalInformationRefs['test']['{host}'] = new PortalInformation(
  231. 2,
  232. $webspaceRefs['pqna'],
  233. $portalRefs['pqna'],
  234. null,
  235. '{host}',
  236. null,
  237. '{host}/{localization}',
  238. false,
  239. '{host}/{localization}',
  240. 4
  241. );
  242. $portalInformationRefs['dev']['{host}/fr'] = new PortalInformation(
  243. 1,
  244. $webspaceRefs['pqna'],
  245. $portalRefs['pqna'],
  246. $localizationRefs['pqna_fr'],
  247. '{host}/fr',
  248. null,
  249. null,
  250. true,
  251. '{host}/{localization}',
  252. 5
  253. );
  254. $portalInformationRefs['dev']['{host}'] = new PortalInformation(
  255. 2,
  256. $webspaceRefs['pqna'],
  257. $portalRefs['pqna'],
  258. null,
  259. '{host}',
  260. null,
  261. '{host}/{localization}',
  262. false,
  263. '{host}/{localization}',
  264. 4
  265. );
  266. $this->setWebspaces($webspaceRefs);
  267. $this->setPortals($portalRefs);
  268. $this->setPortalInformations($portalInformationRefs);
  269. }
  270. }