You are here

protected function Html::decodeIdSafeBase64 in Translation Management Tool 8

Returns decoded id safe base64 data.

1 call to Html::decodeIdSafeBase64()
Html::import in translators/tmgmt_file/src/Plugin/tmgmt_file/Format/Html.php
Implements TMGMTFileExportInterface::import().

File

translators/tmgmt_file/src/Plugin/tmgmt_file/Format/Html.php, line 32

Class

Html
Export into HTML.

Namespace

Drupal\tmgmt_file\Plugin\tmgmt_file\Format

Code

protected function decodeIdSafeBase64($data) {

  // Remove prefixed b.
  $data = substr($data, 1);
  return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));
}