public function renameClasses(array $classMap, array $options)
    {
        $options += ['class' => []];
        $options['class'] = $this->_toClassArray($options['class']);
        $classes = [];
        foreach ($options['class'] as $name) {
            $classes[] = array_key_exists($name, $classMap)
                ? $classMap[$name]
                : $name;
        }
        $options['class'] = trim(implode(' ', $classes));

        return $options;
    }