Documentation

SocialNetworking
in package

Has methods for outputting links for submitting to a number of social networking sites

Table of Contents

Properties

$desc  : mixed
$title  : mixed
$url  : mixed

Methods

details()  : mixed
Set the share details to use when submitting to the various websites.
email()  : mixed
Output a email share button
emailLink()  : mixed
Get the A tag for an email share link
facebook()  : mixed
Get a facebook share button
facebookLink()  : mixed
Get the A tag for a facebook share link
getDesc()  : mixed
getTitle()  : mixed
getUrl()  : mixed
hasdetails()  : mixed
Checks if there are details available
linkedin()  : mixed
Output a linkedin share button
linkedinLink()  : mixed
Get the A tag for a linkedIn share link
pageLink()  : string
Return a link to the main page for a given social media platform
twitter()  : mixed
Output a twitter share button
twitterLink()  : string
Get the A tag for a twitter share link

Properties

Methods

details()

Set the share details to use when submitting to the various websites.

public static details(mixed $title, mixed $desc[, mixed $url = null ]) : mixed
Parameters
$title : mixed
$desc : mixed
$url : mixed = null

email()

Output a email share button

public static email([mixed $icon = null ]) : mixed
Parameters
$icon : mixed = null

Get the A tag for an email share link

public static emailLink([mixed $class = '' ]) : mixed
Parameters
$class : mixed = ''

facebook()

Get a facebook share button

public static facebook([mixed $icon = null ]) : mixed
Parameters
$icon : mixed = null

Get the A tag for a facebook share link

public static facebookLink([mixed $class = '' ]) : mixed
Parameters
$class : mixed = ''

hasdetails()

Checks if there are details available

public static hasdetails() : mixed

linkedin()

Output a linkedin share button

public static linkedin([mixed $icon = null ]) : mixed
Parameters
$icon : mixed = null

Get the A tag for a linkedIn share link

public static linkedinLink([mixed $class = '' ]) : mixed
Parameters
$class : mixed = ''

Return a link to the main page for a given social media platform

public static pageLink(string $type[, bool $new_window = true ]) : string
Parameters
$type : string

The network type to display, e.g. 'facebook'

$new_window : bool = true

Should the link be in a new window?

Return values
string —

The opening A link HTML

twitter()

Output a twitter share button

public static twitter([mixed $icon = null ][, mixed $tweet = null ]) : mixed
Parameters
$icon : mixed = null
$tweet : mixed = null

Get the A tag for a twitter share link

public static twitterLink([string $tweet = null ][, string $link = '' ][, string $via_handle = '' ][, string $class = '' ]) : string
Parameters
$tweet : string = null

The content of the tweet

$link : string = ''

The URL of the link you're sharing

$via_handle : string = ''

The Twitter handle of the company / user / account the post is shared via

$class : string = ''

classes you want added to the tag example: button

Return values
string
On this page

Search results