public function LingotekEntity::getUrl in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekEntity.php \LingotekEntity::getUrl()
- 7.6 lib/Drupal/lingotek/LingotekEntity.php \LingotekEntity::getUrl()
Overrides LingotekTranslatableEntity::getUrl
File
- lib/
Drupal/ lingotek/ LingotekEntity.php, line 333 - Defines LingotekEntity.
Class
- LingotekEntity
- A class wrapper for Lingotek-specific behavior on nodes.
Code
public function getUrl() {
global $base_url;
if ($this->entity_type == 'node' || $this->entity_type == 'comment') {
$hack = (object) array(
'language' => '',
);
// this causes the url function to not prefix the url with the current language the user is viewing the site in
return $base_url . "/lingotek/view/" . $this
->getEntityType() . '/' . $this
->getId() . '/{locale}';
}
return '';
}