public function getTypedName($name, FieldType $type)
    {
        if ($name === 'id') {
            return $name;
        }

        $typeName = $type->type;

        if (isset($this->fieldNameMapping[$typeName])) {
            $typeName = $this->fieldNameMapping[$typeName];
        }

        return $name . '_' . $typeName;
    }
public function getTypedName($name, FieldType $type)
    {
        if ($name === 'id') {
            return $name;
        }

        $typeName = $type->type;

        if (isset($this->fieldNameMapping[$typeName])) {
            $typeName = $this->fieldNameMapping[$typeName];
        }

        return $name . '_' . $typeName;
    }
public function getTypedName ( $ name , FieldType $ type ) { if ( $ name === 'id' ) { return $ name ; } $ typeName = $ type -> type ; if ( isset ( $ this -> fieldNameMapping [ $ typeName ] ) ) { $ typeName = $ this -> fieldNameMapping [ $ typeName ] ; } return $ name . '_' . $ typeName ; }
Map field type.

For indexing backend the following scheme will always be used for names:
{name}_{type}.

Using dynamic fields this allows to define fields either depending on
types, or names.

Only the field with the name 'id' remains untouched.

@param string $name
@param \eZ\Publish\SPI\Search\FieldType $type

@return string
Map field type .