\seekquarry\yioop\views\elementsGroupfeedElement

Element responsible for draw the feeds a user is subscribed to

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()
renderGroupedView()
renderUngroupedView()
formatHref()
renderPath()
renderScripts()
$view
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

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 Feeds for the Various Groups a User is a associated with.

It should be implemented in subclasses.

Parameters

array $data

feed items should be prepared by the controller and stored in the $data['PAGES'] variable. makes use of the CSRF token for anti CSRF attacks

renderGroupedView()

renderGroupedView(string  $paging_query,\seekquarry\yioop\views\elements\array&  $data)

Used to draw group feeds items when we are grouping feeds items by group

Parameters

string $paging_query

stem for all links drawn in view

\seekquarry\yioop\views\elements\array& $data

fields used to draw the queue

renderUngroupedView()

renderUngroupedView(boolean  $logged_in,string  $base_query,string  $paging_query,\seekquarry\yioop\views\elements\array&  $data): array

Used to draw feed items as a combined thread of all groups

Parameters

boolean $logged_in

where or not the session is of a logged in user

string $base_query

url that serves as the stem for all links drawn in view

string $paging_query

base_query concatenated with limit and num

\seekquarry\yioop\views\elements\array& $data

fields used to draw the queue

Returns

array —

$page last feed item processed

formatHref()

formatHref(  $url)

Parameters

$url

renderPath()

renderPath(array  $data,array  $feed_array,string  $aux_url,string  $groups_url,string  $group_name,string  $render_type = "",boolean  $as_list = false)

Used to render the dropdown for paths within the top group feed drop down

Parameters

array $data

set up in controller and SocialComponent with data fields view and this element are supposed to render

array $feed_array

(url => path) options

string $aux_url

url of current group wiki in the case of a group feed. Url of all groups in the case of user feed.

string $groups_url

link to the all feeds feed for a given user

string $group_name

name of current groupfeed

string $render_type

if "user" then prints feed info appropriate for a single use, if "just_group_and_thread" doesn't print group or user specific info, otherwise defaults to current group specific info

boolean $as_list

if should render as an unordered-list rather than a dropdown

renderScripts()

renderScripts(array  $data)

Used to render the Javascript that appears at the non-status updating portion of the footer of this element.

Parameters

array $data

contains arguments needs to draw urls correctly.