protected function formatLabel($attrName)
    {
        if (strpos($attrName, '_') !== false) {
            $tempArr = explode('_', $attrName);
            foreach ($tempArr as $key => $item) {
                $tempArr[$key] = ucfirst(strtolower($item));
            }
            $attrName = implode(' ', $tempArr);
        } else {
            $capitals = [];
            for ($i = 0; $i < mb_strlen($attrName, 'UTF8'); ++$i) {
                if (StringHelper::isCapital($attrName[$i])) {
                    $capitals[] = $attrName[$i];
                }
            }

            foreach ($capitals as $capital) {
                $attrName = str_replace($capital, ' ' . $capital, $attrName);
            }

            $attrName = trim($attrName);
        }

        return $attrName;
    }