/** * {@inheritDoc} */ public function setId($id) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setId', array($id)); return parent::setId($id); }
/** * erstellt eine neue Page anhand der uebergebenen Attribute * * @param string $websiteId * @param array $attributes * @param boolean $useColumnsValuesId Defaults to false * * @throws \Cms\Exception * @return \Orm\Entity\Page */ public function create($websiteId, $attributes, $useColumnsValuesId = false) { $page = new Page(); if ($useColumnsValuesId && isset($attributes['id'])) { $page->setId($attributes['id']); } else { $page->setNewGeneratedId(); } $page->setWebsiteId($websiteId); $this->setAttributesToPage($attributes, $page); try { $this->getEntityManager()->persist($page); $this->getEntityManager()->flush(); $this->getEntityManager()->refresh($page); $this->clearEntityManager(); } catch (Exception $e) { throw new CmsException(709, __METHOD__, __LINE__, null, $e); } return $page; }