protected function getFieldTypeTemplateDirectory(
        FieldInterface $field,
        string $supportingDirectory
    ) {
        /** @var FieldTypeInterface $fieldType */
        $fieldType = $this->container->get((string) $field->getFieldType()->getFullyQualifiedClassName());

        $fieldTypeDirectory = explode('/', $fieldType->directory());
        foreach ($fieldTypeDirectory as $key => $segment) {
            if ($segment === 'vendor') {
                $selector = $key + 2;
                $fieldTypeDirectory[$selector] = $supportingDirectory;
                break;
            }
        }

        return implode('/', $fieldTypeDirectory);
    }
protected function getFieldTypeTemplateDirectory(
        FieldInterface $field,
        string $supportingDirectory
    ) {
        /** @var FieldTypeInterface $fieldType */
        $fieldType = $this->container->get((string) $field->getFieldType()->getFullyQualifiedClassName());

        $fieldTypeDirectory = explode('/', $fieldType->directory());
        foreach ($fieldTypeDirectory as $key => $segment) {
            if ($segment === 'vendor') {
                $selector = $key + 2;
                $fieldTypeDirectory[$selector] = $supportingDirectory;
                break;
            }
        }

        return implode('/', $fieldTypeDirectory);
    }
protected function getFieldTypeTemplateDirectory ( FieldInterface $ field , string $ supportingDirectory ) { /** @var FieldTypeInterface $fieldType */ $ fieldType = $ this -> container -> get ( ( string ) $ field -> getFieldType ( ) -> getFullyQualifiedClassName ( ) ) ; $ fieldTypeDirectory = explode ( '/' , $ fieldType -> directory ( ) ) ; foreach ( $ fieldTypeDirectory as $ key => $ segment ) { if ( $ segment === 'vendor' ) { $ selector = $ key + 2 ; $ fieldTypeDirectory [ $ selector ] = $ supportingDirectory ; break ; } } return implode ( '/' , $ fieldTypeDirectory ) ; }
The field type generator templates are to be defined in the packages
that provide the specific support for what is to be generated

The field's field type, is in a base package, the default package is: 'sexy-field-field-types-base'
The supporting directory, is where the generator is to find it's templates
For example: 'sexy-field-entity' or 'sexy-field-doctrine'

@param FieldInterface $field
@param string $supportingDirectory
@return mixed
The field type generator templates are to be defined in the packages that provide the specific support for what is to be generated