LuceneSettingsForm::_getDefaultMetric PHP Method

_getDefaultMetric() public method

Return the default metric for the current request context.
public _getDefaultMetric ( ) : null | string
return null | string a metric identifier or null
    function _getDefaultMetric()
    {
        $application = PKPApplication::getApplication();
        $metricType = $application->getDefaultMetricType();
        if (empty($metricType)) {
            return null;
        }
        $metricNames = $application->getMetricTypes(true);
        if (!isset($metricNames[$metricType])) {
            return null;
        }
        return $metricNames[$metricType];
    }