public function singleTaxonomy($taxonomyName, $emptyValue = 'none')
    {
        $taxonomyValues = $this->config->get('taxonomy/' . $taxonomyName . '/options');

        // If by accident, someone uses a "tags" taxonomy.
        if (empty($taxonomyValues)) {
            return '[a-z0-9-_]+';
        }
        $taxonomyValues = array_keys($taxonomyValues);
        $requirements = implode('|', $taxonomyValues);

        if ($emptyValue !== null) {
            $requirements .= '|' . $emptyValue;
        }

        return $requirements;
    }
public function singleTaxonomy($taxonomyName, $emptyValue = 'none')
    {
        $taxonomyValues = $this->config->get('taxonomy/' . $taxonomyName . '/options');

        // If by accident, someone uses a "tags" taxonomy.
        if (empty($taxonomyValues)) {
            return '[a-z0-9-_]+';
        }
        $taxonomyValues = array_keys($taxonomyValues);
        $requirements = implode('|', $taxonomyValues);

        if ($emptyValue !== null) {
            $requirements .= '|' . $emptyValue;
        }

        return $requirements;
    }
public function singleTaxonomy ( $ taxonomyName , $ emptyValue = 'none' ) { $ taxonomyValues = $ this -> config -> get ( 'taxonomy/' . $ taxonomyName . '/options' ) ; // If by accident, someone uses a "tags" taxonomy. if ( empty ( $ taxonomyValues ) ) { return '[a-z0-9-_]+' ; } $ taxonomyValues = array_keys ( $ taxonomyValues ) ; $ requirements = implode ( '|' , $ taxonomyValues ) ; if ( $ emptyValue !== null ) { $ requirements .= '|' . $ emptyValue ; } return $ requirements ; }
Return slugs of existing taxonomy values.

@param string $taxonomyName
@param string $emptyValue

@return string
Return slugs of existing taxonomy values .