Skip to content

Commit

Permalink
Added sharing icon class.
Browse files Browse the repository at this point in the history
  • Loading branch information
colintucker committed Apr 19, 2018
1 parent 46b5e04 commit 7b21390
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"require": {
"php": ">=5.6.0",
"silverware/silverware": "^1.0",
"silverware/social": "^1.0"
"silverware/social": "^1.1"
},
"autoload": {
"psr-4": {
Expand Down
93 changes: 93 additions & 0 deletions src/Icons/GoogleSharingIcon.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?php

/**
* This file is part of SilverWare.
*
* PHP version >=5.6.0
*
* For full copyright and license information, please view the
* LICENSE.md file that was distributed with this source code.
*
* @package SilverWare\Google\Icons
* @author Colin Tucker <[email protected]>
* @copyright 2018 Praxis Interactive
* @license https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
* @link https://github.com/praxisnetau/silverware-google
*/

namespace SilverWare\Google\Icons;

use SilverWare\Google\Buttons\GoogleSharingButton;
use SilverWare\Social\Model\SharingIcon;

/**
* An extension of the sharing icon class for a Google sharing icon.
*
* @package SilverWare\Google\Icons
* @author Colin Tucker <[email protected]>
* @copyright 2018 Praxis Interactive
* @license https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
* @link https://github.com/praxisnetau/silverware-google
*/
class GoogleSharingIcon extends SharingIcon
{
/**
* Human-readable singular name.
*
* @var string
* @config
*/
private static $singular_name = 'Google Sharing Icon';

/**
* Human-readable plural name.
*
* @var string
* @config
*/
private static $plural_name = 'Google Sharing Icons';

/**
* Description of this object.
*
* @var string
* @config
*/
private static $description = 'A sharing icon to share the current page via Google';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_GoogleSharingIcon';

/**
* Defines an ancestor class to hide from the admin interface.
*
* @var string
* @config
*/
private static $hide_ancestor = SharingIcon::class;

/**
* Defines the default values for the fields of this object.
*
* @var array
* @config
*/
private static $defaults = [
'FontIcon' => 'google-plus',
'ColorBackgroundLink' => '#f34a38',
'ColorForegroundLink' => '#ffffff'
];

/**
* Defines the class of sharing button to use for the popover.
*
* @var string
* @config
*/
private static $button_class = GoogleSharingButton::class;
}

0 comments on commit 7b21390

Please sign in to comment.