Micon.php in Micon 8
File
src/Plugin/SocialMediaLinks/Iconset/Micon.php
View source
<?php
namespace Drupal\micon\Plugin\SocialMediaLinks\Iconset;
use Drupal\social_media_links\IconsetBase;
use Drupal\social_media_links\IconsetInterface;
class Micon extends IconsetBase implements IconsetInterface {
public function setPath($iconset_id) {
$this->path = 'library';
}
public function getStyle() {
return array(
'normal' => 'normal',
);
}
public function getIconElement($platform, $style) {
$icon_name = $platform
->getIconName();
switch ($icon_name) {
case 'vimeo':
$icon_name = $icon_name . '-square';
break;
case 'googleplus':
$icon_name = 'google-plus';
break;
case 'email':
$icon_name = 'envelope';
break;
}
$icon = array(
'#theme' => 'micon',
'#icon' => 'fa-' . $icon_name,
);
return $icon;
}
public function getIconPath($icon_name, $style) {
return NULL;
}
}
Classes
Name |
Description |
Micon |
Provides 'elegantthemes' iconset. |