AlbumOrama\Frontend\Controllers\CatalogController::searchAction PHP Method

searchAction() public method

public searchAction ( )
    public function searchAction()
    {
        //Top albums
        $phql = 'SELECT
        ar.id,
        ar.name,
        ar.uri,
        ap.url
        FROM AlbumOrama\\Models\\Artists ar
        JOIN AlbumOrama\\Models\\ArtistsPhotos ap
        WHERE
        ap.type = "large" AND
        ar.name LIKE ?0
        ORDER BY ar.listeners DESC
        LIMIT 30';
        $artists = $this->modelsManager->executeQuery($phql, array('%' . preg_replace('/[ ]+/', '%', $this->request->getPost('s')) . '%'));
        $this->view->setVar('artists', $artists);
    }