SocialNetworking
in package
Has methods for outputting links for submitting to a number of social networking sites
Table of Contents
Properties
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
$desc
private
static mixed
$desc
$title
private
static mixed
$title
$url
private
static mixed
$url
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
emailLink()
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
facebookLink()
Get the A tag for a facebook share link
public
static facebookLink([mixed $class = '' ]) : mixed
Parameters
- $class : mixed = ''
getDesc()
public
static getDesc() : mixed
getTitle()
public
static getTitle() : mixed
getUrl()
public
static getUrl() : 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
linkedinLink()
Get the A tag for a linkedIn share link
public
static linkedinLink([mixed $class = '' ]) : mixed
Parameters
- $class : mixed = ''
pageLink()
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
twitterLink()
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