Exemplo n.º 1
0
 public function save(ContentInterface $content)
 {
     if (!$content->getId()) {
         $content->setAuthor($this->tokenStorage->getToken()->getUser());
     }
     return parent::save($content);
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function postPublish()
 {
     $this->subject->setUpdatedAt(new \DateTime());
     $this->contentManager->save($this->subject);
     return $this;
 }