public function getNamedValues($order = 'asc')
    {
        $values = $this->getSortedValues($order);

        $valueArray = [];
        foreach ($values as $value) {
            $valueArray[$value->getAttribute()->getName()] = $value;
        }

        return $valueArray;
    }
public function getNamedValues($order = 'asc')
    {
        $values = $this->getSortedValues($order);

        $valueArray = [];
        foreach ($values as $value) {
            $valueArray[$value->getAttribute()->getName()] = $value;
        }

        return $valueArray;
    }
public function getNamedValues ( $ order = 'asc' ) { $ values = $ this -> getSortedValues ( $ order ) ; $ valueArray = [ ] ; foreach ( $ values as $ value ) { $ valueArray [ $ value -> getAttribute ( ) -> getName ( ) ] = $ value ; } return $ valueArray ; }
Get Named Values

When the automatic sort of form ValueSet form fields does not matter,
you can use this method to get a associative array where the keys hold
the attribute name.

To render a specific form field in Twig you could do something like this:

{{ form_row(form.valueset.namedvalues.yourformfield) }}

@return array
Get Named Values