예제 #1
0
 protected function _getActivityData(KDatabaseRowAbstract $row, $status, KCommandContext $context)
 {
     $clone = clone $row;
     // Use container:path as row identifier.
     $clone->id = $row->container->slug . ':' . $row->path;
     $data = parent::_getActivityData($clone, $status, $context);
     $data['metadata'] = array('image' => $row->isImage(), 'width' => $row->width, 'height' => $row->height, 'size' => $row->size, 'name' => $row->name, 'folder' => $row->folder, 'path' => $row->path, 'container' => array('id' => $row->container->id, 'slug' => $row->container->slug, 'title' => $row->container->title));
     return $data;
 }
예제 #2
0
 protected function _getActivityData(KDatabaseRowAbstract $row, $status, KCommandContext $context)
 {
     $data = parent::_getActivityData($row, $status, $context);
     // Change the action from read to download for download events
     if ($data['name'] === 'download') {
         $data['name'] = 'document';
         $data['action'] = 'download';
     }
     return $data;
 }