You are here

public function Nouveller::getIconPath in Social Media Links Block and Field 8.2

Return the path of an icon for the given platform (iconName) and style.

Parameters

string $icon_name: The name of the icon/platform.

string $style: The style/size.

Return value

string The path to the icon of a platform.

Overrides IconsetInterface::getIconPath

File

src/Plugin/SocialMediaLinks/Iconset/Nouveller.php, line 35

Class

Nouveller
Provides 'nouveller' iconset.

Namespace

Drupal\social_media_links\Plugin\SocialMediaLinks\Iconset

Code

public function getIconPath($icon_name, $style) {
  switch ($icon_name) {
    case 'googleplus':
      $icon_name = 'google';
      break;
  }
  return $this->path . '/' . $style . '/' . $icon_name . '.png';
}