/** * Erstellt einen Lock-Eintrag * * @param string $userId * @param string $runId * @param string $itemId * @param string $websiteId * @param string $type * @return boolean */ public function lockItem($userId, $runId, $itemId, $websiteId, $type) { try { $lock = new Lock(); $lock->setUserid($userId); $lock->setRunid($runId); $lock->setItemid($itemId); $lock->setWebsiteid($websiteId); $lock->setType($type); $lock->setStarttime(time()); $lock->setLastactivity($lock->getStarttime()); $this->getEntityManager()->persist($lock); $this->getEntityManager()->flush(); $this->getEntityManager()->refresh($lock); } catch (\Exception $e) { throw new CmsException(1503, __METHOD__, __LINE__, null, $e); } return $lock; }
/** * {@inheritDoc} */ public function setItemid($itemid) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setItemid', array($itemid)); return parent::setItemid($itemid); }