protected function SocialMediaAdminForm::getSocialMedias in Social media share 8
Get social media elements.
Return value
array Social media elements.
2 calls to SocialMediaAdminForm::getSocialMedias()
- SocialMediaAdminForm::buildForm in src/
Form/ SocialMediaAdminForm.php - Form constructor.
- SocialMediaAdminForm::submitForm in src/
Form/ SocialMediaAdminForm.php - Form submission handler.
File
- src/
Form/ SocialMediaAdminForm.php, line 247
Class
- SocialMediaAdminForm
- Class SocialMediaAdminForm.
Namespace
Drupal\social_media\FormCode
protected function getSocialMedias() {
$elements = [
'facebook_share' => 'Facebook share',
'facebook_msg' => 'Facebook messenger',
'linkedin' => 'Linkedin',
'twitter' => 'Twitter',
'pinterest' => 'Pinterest',
'email' => 'Email',
'whatsapp' => 'whatsapp',
'print' => 'Print',
];
$event = new SocialMediaEvent($elements);
$this->eventDispatcher
->dispatch('social_media.add_more_link', $event);
$elements = $event
->getElement();
return $elements;
}