Ejemplo n.º 1
0
 public function getProperties($record)
 {
     $length = $record->getLength();
     $start = $record->getStart();
     $end = $record->getEnd();
     $endString = $end ? $end->format('H:i') : '';
     if (is_null($length)) {
         $length = abs(time() - $start->getTimestamp());
     }
     $tags = '';
     foreach ($record->getTags() as $tag) {
         $tags .= HTML::span(['.tag'], $tag);
     }
     return ['time' => $start->format('H:i') . ' - ' . $endString, 'name' => HTML::span(['.activity'], $record->getActivity()) . HTML::span(['.category'], ' - ' . $record->getCategory()), 'tags' => $tags, 'length' => self::formatLength($length)];
 }