public function onStartNoticeListPrefill(array &$notices, array $notice_ids, Profile $scoped = null) { // prefill array of objects, before pluginfication it was Notice::fillFaves($notices) Fave::fillFaves($notice_ids); // DB caching if ($scoped instanceof Profile) { Fave::pivotGet('notice_id', $notice_ids, array('user_id' => $scoped->id)); } }