protected function SocialSharingBlock::socialMediaConvertDrupalSettings in Social media share 8
TODO describe what this does and what $variables is.
1 call to SocialSharingBlock::socialMediaConvertDrupalSettings()
- SocialSharingBlock::build in src/
Plugin/ Block/ SocialSharingBlock.php - Builds and returns the renderable array for this block plugin.
File
- src/
Plugin/ Block/ SocialSharingBlock.php, line 187
Class
- SocialSharingBlock
- Provides a 'SocialSharingBlock' block.
Namespace
Drupal\social_media\Plugin\BlockCode
protected function socialMediaConvertDrupalSettings($variables) {
$variable = explode("\n", $variables);
$settings = [];
if (count($variable)) {
foreach ($variable as $each) {
$var = explode("|", $each);
$settings[$var[0]] = str_replace([
"\r\n",
"\n",
"\r",
], "", $var[1]);
}
}
return $settings;
}