src/Field/Factory.php
public function collection($name, array $options = []): FieldTypeInterface
    {
        return (new CollectionType($name))
            ->setLocale($this->app->getLocale())
            ->setViewFactory($this->viewFactory)
            ->setOptions($options);
    }
public function collection($name, array $options = []): FieldTypeInterface
    {
        return (new CollectionType($name))
            ->setLocale($this->app->getLocale())
            ->setViewFactory($this->viewFactory)
            ->setOptions($options);
    }
public function collection ( $ name , array $ options = [ ] ) : FieldTypeInterface { return ( new CollectionType ( $ name ) ) -> setLocale ( $ this -> app -> getLocale ( ) ) -> setViewFactory ( $ this -> viewFactory ) -> setOptions ( $ options ) ; }
Return a collection type instance.

@param string $name
@param array  $options

@return FieldTypeInterface
Return a collection type instance .