function getEntities(Search $search = NULL, $offset = 0, $limit = -1)
{
$themes = $this->loadThemes($this->findAllThemesConfigPaths());
if ($search !== NULL) {
if (!$search instanceof SearchTheme) {
throw new \Exception("The search needs to be a SearchTheme instance.");
}
$themes = $this->filterThemes($search, $themes);
}
return $this->trim($themes, $offset, $limit);
}