protected function prepareFiles(array $ids, array $libraries)
    {
        $prepared = array();

        foreach ($ids as $id) {
            if (!empty($libraries[$id]['files'])) {
                $prepared = array_merge($prepared, $libraries[$id]['files']);
            }
        }

        return $prepared;
    }