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