PHP Class BookStack\Http\Controllers\SearchController

Inheritance: extends Controller
Show file Open project: ssddanbrown/bookstack

Protected Properties

Property Type Description
$bookRepo
$chapterRepo
$pageRepo
$viewService

Public Methods

Method Description
__construct ( PageRepo $pageRepo, BookRepo $bookRepo, ChapterRepo $chapterRepo, ViewService $viewService ) SearchController constructor.
searchAll ( Illuminate\Http\Request $request ) : Illuminate\View\View Searches all entities.
searchBook ( Illuminate\Http\Request $request, integer $bookId ) : Illuminate\View\View Searches all entities within a book.
searchBooks ( Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse | Illuminate\View\View Search only the books in the system.
searchChapters ( Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse | Illuminate\View\View Search only the chapters in the system.
searchEntitiesAjax ( Illuminate\Http\Request $request ) : mixed Search for a list of entities and return a partial HTML response of matching entities.
searchPages ( Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse | Illuminate\View\View Search only the pages in the system.

Method Details

__construct() public method

SearchController constructor.
public __construct ( PageRepo $pageRepo, BookRepo $bookRepo, ChapterRepo $chapterRepo, ViewService $viewService )
$pageRepo BookStack\Repos\PageRepo
$bookRepo BookStack\Repos\BookRepo
$chapterRepo BookStack\Repos\ChapterRepo
$viewService BookStack\Services\ViewService

searchAll() public method

Searches all entities.
public searchAll ( Illuminate\Http\Request $request ) : Illuminate\View\View
$request Illuminate\Http\Request
return Illuminate\View\View

searchBook() public method

Searches all entities within a book.
public searchBook ( Illuminate\Http\Request $request, integer $bookId ) : Illuminate\View\View
$request Illuminate\Http\Request
$bookId integer
return Illuminate\View\View

searchBooks() public method

Search only the books in the system.
public searchBooks ( Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse | Illuminate\View\View
$request Illuminate\Http\Request
return Illuminate\Http\RedirectResponse | Illuminate\View\View

searchChapters() public method

Search only the chapters in the system.
public searchChapters ( Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse | Illuminate\View\View
$request Illuminate\Http\Request
return Illuminate\Http\RedirectResponse | Illuminate\View\View

searchEntitiesAjax() public method

Returns the most popular entities if no search is provided.
public searchEntitiesAjax ( Illuminate\Http\Request $request ) : mixed
$request Illuminate\Http\Request
return mixed

searchPages() public method

Search only the pages in the system.
public searchPages ( Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse | Illuminate\View\View
$request Illuminate\Http\Request
return Illuminate\Http\RedirectResponse | Illuminate\View\View

Property Details

$bookRepo protected property

protected $bookRepo

$chapterRepo protected property

protected $chapterRepo

$pageRepo protected property

protected $pageRepo

$viewService protected property

protected $viewService