YaWK  24.1
Yet another WebKit
YAWK\WIDGETS\TWITTER\BUTTON\twitterTweetButton Class Reference

Embed Twitter TweetButton. More...

+ Inheritance diagram for YAWK\WIDGETS\TWITTER\BUTTON\twitterTweetButton:

Public Member Functions

 __construct ($db)
 Load all widget settings from database and fill object. More...
 
 init ()
 Init Twitter TweetButton Widget. More...
 
- Public Member Functions inherited from YAWK\widget
 getHeading ($heading, $subtext)
 Get widget heading and subtext, return headline. More...
 
 getWidgetSettingsArray ($db)
 Get widget settings and return it as array. More...
 
 printObject ()
 Print all object data. More...
 

Public Attributes

 $twitterTweetButtonHeading = ''
 
 $twitterTweetButtonSubtext = ''
 
 $twitterTweetButtonText = ""
 
 $widget = ''
 
- Public Attributes inherited from YAWK\widget
 $data
 
 $date_publish
 
 $date_unpublish
 
 $folder
 
 $id
 
 $marginBottom
 
 $marginTop
 
 $name
 
 $pageID
 
 $position
 
 $published
 
 $sort
 
 $widgetTitle
 
 $widgetType
 

Additional Inherited Members

- Static Public Member Functions inherited from YAWK\widget
static getAllSettingsIntoArray ($db, $widgetID)
 Returns an array with all widget settings data. More...
 
static getAllWidgetTypes ($db)
 Return all widget types as associative array. More...
 
static getCurrentWidgetPath ($db)
 return current widget path More...
 
static getFacebookLikeBox ()
 return the facebook likebox widget More...
 
static getLoginBox ()
 return the user login box widget More...
 
static loadWidgetsOfPage ($db, $page)
 Returns an array of all widgets that are linked with given page->id. More...
 

Detailed Description

Embed Twitter TweetButton.

Twitter TweetButton Widget - embed Twitter TweetButton

Embed Twitter TweetButton. All you need is the URL of your TweetButton and the amount of items you wish to embed. You will get the latest TweetButtons.

Author
Daniel Retzl danie.nosp@m.lret.nosp@m.zl@gm.nosp@m.ail..nosp@m.com
Version
1.0.0

Definition at line 16 of file twitterTweetButton.php.

Constructor & Destructor Documentation

◆ __construct()

YAWK\WIDGETS\TWITTER\BUTTON\twitterTweetButton::__construct (   $db)

Load all widget settings from database and fill object.

Parameters
object$dbDatabase Object

Load all widget settings on object init.

Definition at line 32 of file twitterTweetButton.php.

34  {
35  // load this widget settings from db
36  $this->widget = new \YAWK\widget();
37  $settings = $this->widget->getWidgetSettingsArray($db);
38  foreach ($settings as $property => $value) {
39  $this->$property = $value;
40  }
if(isset($_POST['save'])) $settings
$value

References $db, $settings, $value, and YAWK\widget\getWidgetSettingsArray().

Member Function Documentation

◆ init()

YAWK\WIDGETS\TWITTER\BUTTON\twitterTweetButton::init ( )

Init Twitter TweetButton Widget.

Embed a single TweetButton from twitter

Definition at line 46 of file twitterTweetButton.php.

48  { // display heading
49  echo $this->getHeading($this->twitterTweetButtonHeading, $this->twitterTweetButtonSubtext);
50  //
51  $this->twitterTweetButtonText = rawurldecode($this->twitterTweetButtonText);
52 
53  echo "<a class=\"twitter-share-button btn btn-info\"
54  href=\"https://twitter.com/intent/tweet?text=$this->twitterTweetButtonText\"
55  data-size=\"large\">Tweet about that</a>";
getHeading($heading, $subtext)
Get widget heading and subtext, return headline.
Definition: widget.php:669

References YAWK\widget\getHeading().

Member Data Documentation

◆ $twitterTweetButtonHeading

YAWK\WIDGETS\TWITTER\BUTTON\twitterTweetButton::$twitterTweetButtonHeading = ''
Parameters
stringTitle that will be shown above widget

Definition at line 21 of file twitterTweetButton.php.

◆ $twitterTweetButtonSubtext

YAWK\WIDGETS\TWITTER\BUTTON\twitterTweetButton::$twitterTweetButtonSubtext = ''
Parameters
stringSubtext will be displayed beside title

Definition at line 23 of file twitterTweetButton.php.

◆ $twitterTweetButtonText

YAWK\WIDGETS\TWITTER\BUTTON\twitterTweetButton::$twitterTweetButtonText = ""
Parameters
stringText

Definition at line 25 of file twitterTweetButton.php.

◆ $widget

YAWK\WIDGETS\TWITTER\BUTTON\twitterTweetButton::$widget = ''
Parameters
objectglobal widget object data

Definition at line 19 of file twitterTweetButton.php.


The documentation for this class was generated from the following file: