protected function getTabTitle($type, $template)
    {
        if ($type === 'page') {
            $result = $template->title ?: $template->getFileName();
            if (!$result) {
                $result = trans('cms::lang.page.new');
            }

            return $result;
        }

        if ($type === 'partial' || $type === 'layout' || $type === 'content' || $type === 'asset') {
            $result = in_array($type, ['asset', 'content']) ? $template->getFileName() : $template->getBaseFileName();
            if (!$result) {
                $result = trans('cms::lang.'.$type.'.new');
            }

            return $result;
        }

        return $template->getFileName();
    }
protected function getTabTitle($type, $template)
    {
        if ($type === 'page') {
            $result = $template->title ?: $template->getFileName();
            if (!$result) {
                $result = trans('cms::lang.page.new');
            }

            return $result;
        }

        if ($type === 'partial' || $type === 'layout' || $type === 'content' || $type === 'asset') {
            $result = in_array($type, ['asset', 'content']) ? $template->getFileName() : $template->getBaseFileName();
            if (!$result) {
                $result = trans('cms::lang.'.$type.'.new');
            }

            return $result;
        }

        return $template->getFileName();
    }
protected function getTabTitle ( $ type , $ template ) { if ( $ type === 'page' ) { $ result = $ template -> title ? : $ template -> getFileName ( ) ; if ( ! $ result ) { $ result = trans ( 'cms::lang.page.new' ) ; } return $ result ; } if ( $ type === 'partial' || $ type === 'layout' || $ type === 'content' || $ type === 'asset' ) { $ result = in_array ( $ type , [ 'asset' , 'content' ] ) ? $ template -> getFileName ( ) : $ template -> getBaseFileName ( ) ; if ( ! $ result ) { $ result = trans ( 'cms::lang.' . $ type . '.new' ) ; } return $ result ; } return $ template -> getFileName ( ) ; }
Returns the text for a template tab
@param string $type
@param string $template
@return string
Returns the text for a template tab