src/Graviton/SchemaBundle/SchemaUtils.php
public function getCollectionSchema($modelName, DocumentModel $model)
    {
        $collectionSchema = new Schema;
        $collectionSchema->setTitle(sprintf('Array of %s objects', $modelName));
        $collectionSchema->setType('array');
        $collectionSchema->setItems($this->getModelSchema($modelName, $model));
        return $collectionSchema;
    }
public function getCollectionSchema($modelName, DocumentModel $model)
    {
        $collectionSchema = new Schema;
        $collectionSchema->setTitle(sprintf('Array of %s objects', $modelName));
        $collectionSchema->setType('array');
        $collectionSchema->setItems($this->getModelSchema($modelName, $model));
        return $collectionSchema;
    }
public function getCollectionSchema ( $ modelName , DocumentModel $ model ) { $ collectionSchema = new Schema ; $ collectionSchema -> setTitle ( sprintf ( 'Array of %s objects' , $ modelName ) ) ; $ collectionSchema -> setType ( 'array' ) ; $ collectionSchema -> setItems ( $ this -> getModelSchema ( $ modelName , $ model ) ) ; return $ collectionSchema ; }
get schema for an array of models

@param string        $modelName name of model
@param DocumentModel $model     model

@return Schema
get schema for an array of models