Exemplo n.º 1
0
 /**
  * Store the deleted time.
  *
  * @return void
  */
 public function postDelete()
 {
     \RevisionRepository::create(['revisionable_type' => get_class($this), 'revisionable_id' => $this->getKey(), 'key' => 'deleted_at', 'old_value' => null, 'new_value' => new DateTime(), 'user_id' => $this->getUserId()]);
 }
Exemplo n.º 2
0
 /**
  * Removes the user from the given group.
  *
  * @param \Cartalyst\Sentry\Groups\GroupInterface $group
  *
  * @return bool
  */
 public function removeGroup(GroupInterface $group)
 {
     RevisionRepository::create(['revisionable_type' => get_class($this), 'revisionable_id' => $this->getKey(), 'key' => 'removed_group', 'old_value' => null, 'new_value' => $group->getName(), 'user_id' => Credentials::getUser()->id]);
     return parent::removeGroup($group);
 }
Exemplo n.º 3
0
 /**
  * @return QueryBuilder
  */
 public function getRevisionsQb()
 {
     return $this->revisionRepository->createQueryBuilder('a')->andWhere('a.invoice = :invoice')->setParameter('invoice', $this->getCurrentInvoice()->id);
 }