You are here

public function SocialMediaSubscriber::renderSocialMedia in Social media share 8

Subscribes to social_media.pre_render event.

File

./social_media.api.php, line 48

Class

SocialMediaSubscriber
Listens to the dynamic route events.

Namespace

Drupal\social_media\EventSubscriber

Code

public function renderSocialMedia($event) {
  $element = $event
    ->getElement();
  $element['facebook_msg']['text'] = 'New facebook msg text';
  $event
    ->setElement($element);
}