public function getDropbox(&$contents, $tid) { $user = User::getVlasmarktUser(); $images = Dbox::getRelated(); foreach ($images as $image) { $data = $image->toArray(); if (!isset($tid)) { $tid = 0; } $contents[$data['tid'] != $tid ? (string) $data['tid'] : 0] = array('tid' => $data['tid'], 'content' => '/store/dropbox/' . $data['content'], 'user' => $user[0]->name, 'url' => $user[0]->url); } ksort($contents); }