Esempio n. 1
0
 public function createLogEntry(User $user)
 {
     $defaultTask = $this->taskRepository->findUserDefaultTask($user->getId());
     $logEntry = new LogEntry();
     $logEntry->setTask($defaultTask);
     $logEntry->setFrom(new \DateTime());
     return $logEntry;
 }
Esempio n. 2
0
 /**
  * Creates a form to delete a LogEntry entity.
  *
  * @param LogEntry $logEntry The LogEntry entity
  * @return Form The form
  */
 private function createDeleteForm(LogEntry $logEntry)
 {
     return $this->createFormBuilder()->setAction($this->generateUrl('log_entry_delete', ['id' => $logEntry->getId()]))->setMethod('DELETE')->getForm();
 }