Yioop_V9.5_Source_Code_Documentation

GroupfeedElement extends Element
in package
implements CrawlConstants

Element responsible for draw the feeds a user is subscribed to

Tags
author

Chris Pollett

Interfaces, Classes, Traits and Enums

CrawlConstants
Shared constants and enums used by components that are involved in the crawling process

Table of Contents

$view  : object
The View on which this Element is drawn
__construct()  : mixed
constructor stores a reference to the view this element will reside on
formatHref()  : string
Used to slightly clean up hypertext links before drawing them (get rid of empty queries, avoid double encoding)
render()  : mixed
Draws the Feeds for the Various Groups a User is a associated with.
renderGroupedView()  : mixed
Used to draw group feeds items when we are grouping feeds items by group
renderPath()  : mixed
Used to render the dropdown for paths within the top group feed drop down
renderScripts()  : mixed
Used to render the Javascript that appears at the non-status updating portion of the footer of this element.
renderUngroupedView()  : array<string|int, mixed>
Used to draw feed items as a combined thread of all groups or a list of threads for a particular group or a a thread start followed by comments for a particular thread
drawCommentForm()  : mixed
Used to draw the add comment form to add a comment to an existing thread
drawStartThreadForm()  : mixed
Used to draw the form to start a new thread in a group
renderIconContainer()  : mixed
Used to draw the icon of a user with a user name dropdown containing links about that user below it for a thread or comment item.

Properties

$view

The View on which this Element is drawn

public object $view

Methods

__construct()

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

public __construct([object $view = null ]) : mixed
Parameters
$view : object = null

object this element will reside on

Return values
mixed

formatHref()

Used to slightly clean up hypertext links before drawing them (get rid of empty queries, avoid double encoding)

public formatHref(string $url) : string
Parameters
$url : string

to clean up

Return values
string

cleaned url

render()

Draws the Feeds for the Various Groups a User is a associated with.

public render(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

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

Return values
mixed

renderGroupedView()

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

public renderGroupedView(string $paging_query, array<string|int, mixed> &$data) : mixed
Parameters
$paging_query : string

stem for all links drawn in view

$data : array<string|int, mixed>

fields used to draw the queue

Return values
mixed

renderPath()

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

public renderPath(array<string|int, mixed> $data, array<string|int, mixed> $feed_array, string $aux_url, string $groups_url, string $group_name[, string $render_type = "" ][, bool $as_list = false ]) : mixed
Parameters
$data : array<string|int, mixed>

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

$feed_array : array<string|int, mixed>

(url => path) options

$aux_url : string

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

$groups_url : string

link to the all feeds feed for a given user

$group_name : string

name of current groupfeed

$render_type : string = ""

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

$as_list : bool = false

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

Return values
mixed

renderScripts()

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

public renderScripts(array<string|int, mixed> $data[, mixed $with_status_update = false ]) : mixed
Parameters
$data : array<string|int, mixed>

contains arguments needs to draw urls correctly.

$with_status_update : mixed = false
Return values
mixed

renderUngroupedView()

Used to draw feed items as a combined thread of all groups or a list of threads for a particular group or a a thread start followed by comments for a particular thread

public renderUngroupedView(bool $logged_in, string $base_query, string $paging_query, array<string|int, mixed> &$data) : array<string|int, mixed>
Parameters
$logged_in : bool

whether or not the session is of a logged in user

$base_query : string

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

$paging_query : string

base_query concatenated with limit and num

$data : array<string|int, mixed>

fields used to draw the queue

Return values
array<string|int, mixed>

$page last feed item processed

drawCommentForm()

Used to draw the add comment form to add a comment to an existing thread

private drawCommentForm(int $thread_id, int $group_id, array<string|int, mixed> $data) : mixed
Parameters
$thread_id : int

of thread to draw form for

$group_id : int

of group to draw form for

$data : array<string|int, mixed>

containing other field needed to draw the form

Return values
mixed

drawStartThreadForm()

Used to draw the form to start a new thread in a group

private drawStartThreadForm(int $group_id, array<string|int, mixed> $data) : mixed
Parameters
$group_id : int

of group to draw form for

$data : array<string|int, mixed>

containing other field needed to draw the form

Return values
mixed

renderIconContainer()

Used to draw the icon of a user with a user name dropdown containing links about that user below it for a thread or comment item.

private renderIconContainer(array<string|int, mixed> $page, string $controller, int $item_cnt, bool $logged_in, string $token[, string $user_name = "" ][, array<string|int, mixed> $contacts = [] ][, string $uid_prefix = 'uid-' ][, string $paging_query = "" ]) : mixed
Parameters
$page : array<string|int, mixed>

thread item which is currently being rendered and on which the Icon container will appear

$controller : string

the name of the controller that will handle requests related to the view that is being drawn

$item_cnt : int

the number of thread items previously drawn + 1

$logged_in : bool

whether the used is logged in

$token : string

string with CSRF token to prevent cross site attacks

$user_name : string = ""

name of current user or public if not logged in

$contacts : array<string|int, mixed> = []

list of contacts of current user

$uid_prefix : string = 'uid-'

prefix to use on id attributes of tags that need to be unique to this particular thread item

$paging_query : string = ""

base url to use for the add contact link

Return values
mixed

        

Search results