class Micon in Micon 8
Same name in this branch
- 8 src/TwigExtension/Micon.php \Drupal\micon\TwigExtension\Micon
- 8 src/Element/Micon.php \Drupal\micon\Element\Micon
- 8 src/Entity/Micon.php \Drupal\micon\Entity\Micon
- 8 src/Plugin/SocialMediaLinks/Iconset/Micon.php \Drupal\micon\Plugin\SocialMediaLinks\Iconset\Micon
Same name and namespace in other branches
- 2.x src/Plugin/SocialMediaLinks/Iconset/Micon.php \Drupal\micon\Plugin\SocialMediaLinks\Iconset\Micon
Provides 'elegantthemes' iconset.
Plugin annotation
@Iconset(
id = "micon",
publisher = "JaceRider",
publisherUrl = "https://github.com/jacerider/micon",
name = "Micon",
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\social_media_links\IconsetBase implements ContainerFactoryPluginInterface, IconsetInterface
- class \Drupal\micon\Plugin\SocialMediaLinks\Iconset\Micon implements IconsetInterface
- class \Drupal\social_media_links\IconsetBase implements ContainerFactoryPluginInterface, IconsetInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of Micon
8 string references to 'Micon'
- micon.info.yml in ./
micon.info.yml - micon.info.yml
- micon.links.menu.yml in ./
micon.links.menu.yml - micon.links.menu.yml
- micon_content_type.info.yml in micon_content_type/
micon_content_type.info.yml - micon_content_type/micon_content_type.info.yml
- micon_link.info.yml in micon_link/
micon_link.info.yml - micon_link/micon_link.info.yml
- micon_local_task.info.yml in micon_local_task/
micon_local_task.info.yml - micon_local_task/micon_local_task.info.yml
File
- src/
Plugin/ SocialMediaLinks/ Iconset/ Micon.php, line 18
Namespace
Drupal\micon\Plugin\SocialMediaLinks\IconsetView source
class Micon extends IconsetBase implements IconsetInterface {
/**
* {@inheritdoc}
*/
public function setPath($iconset_id) {
$this->path = 'library';
}
/**
* {@inheritdoc}
*/
public function getStyle() {
return array(
'normal' => 'normal',
);
}
/**
* {@inheritdoc}
*/
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;
}
/**
* {@inheritdoc}
*/
public function getIconPath($icon_name, $style) {
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
IconsetBase:: |
protected | property | ||
IconsetBase:: |
protected | property | ||
IconsetBase:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
IconsetBase:: |
public static | function | Explode the styles. | |
IconsetBase:: |
public | function |
Return the url to download the iconset. Overrides IconsetInterface:: |
|
IconsetBase:: |
public | function | Get the library. | 1 |
IconsetBase:: |
public | function |
Return the name of the iconset. Overrides IconsetInterface:: |
|
IconsetBase:: |
public | function | Get the path to the iconset. | |
IconsetBase:: |
public | function |
Return the name of the publisher. Overrides IconsetInterface:: |
|
IconsetBase:: |
public | function |
Return the url of the publisher. Overrides IconsetInterface:: |
|
IconsetBase:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
Micon:: |
public | function |
Get the iconset element. Overrides IconsetBase:: |
|
Micon:: |
public | function |
Return the path of an icon for the given platform (iconName) and style. Overrides IconsetInterface:: |
|
Micon:: |
public | function |
Return the available styles. Overrides IconsetInterface:: |
|
Micon:: |
public | function |
Set the path for the given iconset. Overrides IconsetBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |