Example #1
0
 /**
  * Setzt Attribute in einer Website neu
  *
  * @param array $attributes
  * @param Website $orm
  */
 protected function setAttributesToWebsite($attributes, Website $orm)
 {
     if (isset($attributes['name'])) {
         $orm->setName($attributes['name']);
     }
     if (isset($attributes['navigation'])) {
         $orm->setNavigation($attributes['navigation']);
     }
     if (isset($attributes['description'])) {
         $orm->setDescription($attributes['description']);
     }
     if (isset($attributes['publishingenabled'])) {
         $orm->setPublishingEnabled((bool) $attributes['publishingenabled']);
     }
     if (isset($attributes['publish'])) {
         $orm->setPublish($attributes['publish']);
     }
     if (isset($attributes['version']) && is_int($attributes['version'])) {
         $orm->setVersion($attributes['version']);
     }
     if (isset($attributes['colorscheme'])) {
         $orm->setColorscheme($attributes['colorscheme']);
     }
     if (isset($attributes['resolutions'])) {
         $orm->setResolutions($attributes['resolutions']);
     }
     if (isset($attributes['home'])) {
         $orm->setHome($attributes['home']);
     }
     if (isset($attributes['usedsetid'])) {
         $orm->setUsedSetId($attributes['usedsetid']);
     }
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function toCmsData()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'toCmsData', array());
     return parent::toCmsData();
 }
Example #3
0
 /**
  * Holt anhand der Website-ID Daten zu den in der Navigation verwendeten Pages
  *
  * @param \Orm\Entity\Website $website
  * @return string
  */
 protected function getNavigationWithDataFromWebsite($website)
 {
     $pageInfos = $this->getBusiness('Page')->getInfosByWebsiteId($website->getId());
     $navigation = \Zend_Json::decode($website->getNavigation());
     $arrayVerwalter = new Seitenbau\ArrayData();
     if (is_array($pageInfos) && count($pageInfos) > 0 && is_array($navigation)) {
         $arrayVerwalter->mergeData($navigation, $pageInfos);
     }
     return $navigation;
 }