/** * {@inheritdoc} * * @return null|Page */ public function getEntity($id = null) { if ($id === null) { $entity = new Page(); $entity->setSessionId('new_' . hash('sha1', uniqid(mt_rand()))); } else { $entity = parent::getEntity($id); if ($entity !== null) { $entity->setSessionId($entity->getId()); } } return $entity; }
/** * {@inheritDoc} */ public function setSessionId($id) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSessionId', array($id)); return parent::setSessionId($id); }