protected function mapTypeName(AbstractModel $model)
    {
        if ($model instanceof CurrentSession) {
            $mapped = 'current_session';
        } else {
            $classname = $this->getType($model);
            $mapped = str_replace(
                array(
                '\\',
                'invoice_History',
                'contact_Note',
                ), array(
                '_',
                'historie',
                'note',
                ), lcfirst($classname)
            );
            if (false !== ($pos = strpos($mapped, '_'))) {
                $mapped = substr($mapped, 0, $pos);
            }
            $mapped = strtolower(
                    preg_replace_callback('/([A-Z])/', array($this, 'classnameToUrlpartCallback'), $mapped)
                ) . 's';
        }
        return $mapped;
    }