\seekquarry\yioop\views\elementsSearchElement

Element used to present search results It is also contains the landing page search box for people to types searches into

Elements are classes are used to render portions of a web page which might be common to several views like a view there is supposed to minimal php code in an element

Summary

Methods
Properties
Constants
__construct()
render()
renderSearchResults()
renderSearchLanding()
$view
GIT_EXTENSION
SCORE_PRECISION
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

GIT_EXTENSION

GIT_EXTENSION

Represent extension of Git urls

SCORE_PRECISION

SCORE_PRECISION

Number of decimals for search result scores

Properties

$view

$view : object

The View on which this Element is drawn

Type

object

Methods

__construct()

__construct(object  $view = null) 

constructor stores a reference to the view this element will reside on

Parameters

object $view

object this element will reside on

render()

render(array  $data) 

Draws the main landing pages as well as search result pages

It should be implemented in subclasses.

Parameters

array $data

PAGES contains all the summaries of web pages returned by the current query, $data also contains information about how the the query took to process and the total number of results, how to fetch the next results, etc.

renderSearchResults()

renderSearchResults(array  $data) 

Used to draw the results of a query to the Yioop Search Engine

Parameters

array $data

an associative array containing a PAGES field needed to render search result

renderSearchLanding()

renderSearchLanding(array  $data) 

Draws the landing page for this instance of Yioop when the default big search bar (rather than the Main public wiki page is used)

Parameters

array $data

containing fields used to draw landing page