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

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