You are here

private function ShareMessage::getUrl in Share Message 7

Getter for the share URL.

Parameters

array $context: The context for the token replacements.

Return value

string The URL for this share message.

3 calls to ShareMessage::getUrl()
ShareMessage::addOGTags in includes/sharemessage.entity.inc
Function that adds OG tags in the header of the page.
ShareMessage::buildAdditionalAttributes in includes/sharemessage.entity.inc
Function that adds icon style with addThis:attributes (url, title, description) as part of addThis widget.
ShareMessage::buildContent in includes/sharemessage.entity.inc
Overrides Entity::buildContent().

File

includes/sharemessage.entity.inc, line 345
Definition of ShareMessage entity class.

Class

ShareMessage

Code

private function getUrl($context) {
  $options = array(
    'absolute' => TRUE,
  );
  if (!empty($this->settings['enforce_usage'])) {
    $options['query'] = array(
      'smid' => $this->smid,
    );
  }
  return url($this
    ->getTokenizedField('sharemessage_url', $context, current_path()), $options);
}