\seekquarry\yioop\views\helpersFeedsHelper

Helper used to draw links and snippets for RSS feeds

Helpers are classes used to reduce the coding required in Views. They do some computation with the data they are supplied and output HTML/XML

Summary

Methods
Properties
Constants
__construct()
render()
renderFeedItem()
getPubdateString()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() 

The constructor at this point does nothing

render()

render(array  $feed_pages, string  $csrf_token, string  $query, string  $subsearch, boolean  $open_in_tabs = false) 

Takes page summaries for RSS pages and the current query and draws list of news links and a link to the news link subsearch page if applicable.

Parameters

array $feed_pages

page data from news feeds

string $csrf_token

token to prevent cross site request forgeries

string $query

the current search query

string $subsearch

the name of the subsearch of this feed For example, one could have sports feed, a news feed, etc

boolean $open_in_tabs

whether new links should be opened in tabs

renderFeedItem()

renderFeedItem(array  $page, string  $csrf_token, string  $query, string  $subsearch, boolean  $open_in_tabs) 

Renders one search source feed item into SERP.

Parameters

array $page

page data of a feed item to render

string $csrf_token

token to prevent cross site request forgeries

string $query

the current search query

string $subsearch

name of subsearch page this image group on

boolean $open_in_tabs

whether new links should be opened in tabs

getPubdateString()

getPubdateString(integer  $time, integer  $pub_date) : string

Write as an string in the current locale the difference between the publication date of a post and the current time

Parameters

integer $time

timestamp for current time

integer $pub_date

timestamp for feed_item publication

Returns

string —

in the current locale the time difference