Commit 0b29def6 authored by Niklas de Vries's avatar Niklas de Vries

add find all images service method

parent e2aef915
......@@ -468,4 +468,17 @@ class MediaService extends Generic
throw new NotFoundException();
}
}
/**
* @param array $order
* @param int $amount
* @param int $offset
* @return Media[]
*/
public function findAllImages($order = ['id' => 'DESC'], $amount = 50, $offset = 0)
{
$filter = ['mediatype' => ['image/jpeg', 'image/png', 'image/gif']];
return $this->findAllByModel('Model:Media', $filter, $order, $amount, $offset);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment