public function extractUrlAliasFromData($data)
    {
        $urlAlias = new UrlAlias();

        list($type, $destination) = $this->matchTypeAndDestination($data['action']);
        $urlAlias->id = $data['parent'] . '-' . $data['text_md5'];
        $urlAlias->pathData = $this->normalizePathData($data['raw_path_data']);
        $urlAlias->languageCodes = $this->languageMaskGenerator->extractLanguageCodesFromMask($data['lang_mask']);
        $urlAlias->alwaysAvailable = $this->languageMaskGenerator->isAlwaysAvailable($data['lang_mask']);
        $urlAlias->isHistory = isset($data['is_path_history']) ? $data['is_path_history'] : !$data['is_original'];
        $urlAlias->isCustom = (bool)$data['is_alias'];
        $urlAlias->forward = $data['is_alias'] && $data['alias_redirects'];
        $urlAlias->destination = $destination;
        $urlAlias->type = $type;

        return $urlAlias;
    }