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

Open in your IDE?
  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('example');
  32. $webspace->setName("TheaterTotal.de");
  33. // add localization to webspace
  34. $localization0 = new Localization('en', '');
  35. $localization0->setShadow('');
  36. $localization0->setDefault(false);
  37. $localization0->setXDefault('');
  38. $localizationRefs['example_en'] = $localization0;
  39. $webspace->addLocalization($localization0);
  40. // add localization to webspace
  41. $localization0 = new Localization('de', '');
  42. $localization0->setShadow('');
  43. $localization0->setDefault(true);
  44. $localization0->setXDefault('');
  45. $localizationRefs['example_de'] = $localization0;
  46. $webspace->addLocalization($localization0);
  47. // add theme
  48. $webspace->addTemplate('search', 'search/search');
  49. $webspace->addTemplate('error', 'error/error');
  50. $webspace->addDefaultTemplate('page', 'default');
  51. $webspace->addDefaultTemplate('home', 'homepage');
  52. // add navigation
  53. $navigation = new Navigation();
  54. $navigation->addContext(new NavigationContext('main', array(
  55. 'title' => array(
  56. 'en' => 'Main Navigation',
  57. 'de' => 'Hauptnavigation',
  58. )
  59. ,
  60. )
  61. ));
  62. $webspace->setNavigation($navigation);
  63. $webspace->setResourceLocatorStrategy('tree_leaf_edit');
  64. // new portal
  65. $portal = new Portal();
  66. $portal->setName('theatertotal.de');
  67. $portal->setKey('example');
  68. $portal->setWebspace($webspace);
  69. // add localization
  70. $localization = new Localization('en', '');
  71. $localization->setDefault('');
  72. $localization->setXDefault('');
  73. $portal->addLocalization($localization);
  74. // add localization
  75. $localization = new Localization('de', '');
  76. $localization->setDefault('1');
  77. $localization->setXDefault('');
  78. $portal->addLocalization($localization);
  79. // add environment
  80. $environment = new Environment();
  81. $environment->setType('prod');
  82. // add environment url
  83. $url = new Url();
  84. $url->setUrl('{host}');
  85. $url->setLanguage('de');
  86. $url->setCountry('');
  87. $url->setSegment('');
  88. $url->setRedirect('');
  89. $url->setMain(true);
  90. $environment->addUrl($url);
  91. $portal->addEnvironment($environment);
  92. // add environment
  93. $environment = new Environment();
  94. $environment->setType('stage');
  95. // add environment url
  96. $url = new Url();
  97. $url->setUrl('{host}');
  98. $url->setLanguage('de');
  99. $url->setCountry('');
  100. $url->setSegment('');
  101. $url->setRedirect('');
  102. $url->setMain(true);
  103. $environment->addUrl($url);
  104. $portal->addEnvironment($environment);
  105. // add environment
  106. $environment = new Environment();
  107. $environment->setType('test');
  108. // add environment url
  109. $url = new Url();
  110. $url->setUrl('{host}');
  111. $url->setLanguage('de');
  112. $url->setCountry('');
  113. $url->setSegment('');
  114. $url->setRedirect('');
  115. $url->setMain(true);
  116. $environment->addUrl($url);
  117. $portal->addEnvironment($environment);
  118. // add environment
  119. $environment = new Environment();
  120. $environment->setType('dev');
  121. // add environment url
  122. $url = new Url();
  123. $url->setUrl('{host}');
  124. $url->setLanguage('de');
  125. $url->setCountry('');
  126. $url->setSegment('');
  127. $url->setRedirect('');
  128. $url->setMain(true);
  129. $environment->addUrl($url);
  130. $portal->addEnvironment($environment);
  131. $portalRefs['example'] = $portal;
  132. $webspace->addPortal($portal);
  133. $webspaceRefs['example'] = $webspace;
  134. $portalInformationRefs['prod']['{host}'] = new PortalInformation(
  135. 1,
  136. $webspaceRefs['example'],
  137. $portalRefs['example'],
  138. $localizationRefs['example_de'],
  139. '{host}',
  140. null,
  141. null,
  142. true,
  143. '{host}',
  144. 5
  145. );
  146. $portalInformationRefs['stage']['{host}'] = new PortalInformation(
  147. 1,
  148. $webspaceRefs['example'],
  149. $portalRefs['example'],
  150. $localizationRefs['example_de'],
  151. '{host}',
  152. null,
  153. null,
  154. true,
  155. '{host}',
  156. 5
  157. );
  158. $portalInformationRefs['test']['{host}'] = new PortalInformation(
  159. 1,
  160. $webspaceRefs['example'],
  161. $portalRefs['example'],
  162. $localizationRefs['example_de'],
  163. '{host}',
  164. null,
  165. null,
  166. true,
  167. '{host}',
  168. 5
  169. );
  170. $portalInformationRefs['dev']['{host}'] = new PortalInformation(
  171. 1,
  172. $webspaceRefs['example'],
  173. $portalRefs['example'],
  174. $localizationRefs['example_de'],
  175. '{host}',
  176. null,
  177. null,
  178. true,
  179. '{host}',
  180. 5
  181. );
  182. $this->setWebspaces($webspaceRefs);
  183. $this->setPortals($portalRefs);
  184. $this->setPortalInformations($portalInformationRefs);
  185. }
  186. }