public static function search(array $ids)
{
// get db
$db = FrontendModel::getContainer()->get('database');
// define ids to ignore
$ignore = array(404);
// get items
$items = (array) $db->getRecords('SELECT p.id, p.title, m.url, p.revision_id AS text
FROM pages AS p
INNER JOIN meta AS m ON p.meta_id = m.id
INNER JOIN themes_templates AS t ON p.template_id = t.id
WHERE p.id IN (' . implode(', ', $ids) . ') AND p.id NOT IN (' . implode(', ', $ignore) . ') AND p.status = ? AND p.hidden = ? AND p.language = ?', array('active', 'N', LANGUAGE), 'id');
// prepare items for search
foreach ($items as &$item) {
$item['text'] = implode(' ', (array) $db->getColumn('SELECT pb.html
FROM pages_blocks AS pb
WHERE pb.revision_id = ?', array($item['text'])));
$item['full_url'] = FrontendNavigation::getURL($item['id']);
}
return $items;
}