Skip to content

Update FIMAdapter class to have responses wrapped in mapEntriesToModel Helper method #14

Open
@cam-vanorman

Description

@cam-vanorman

Request

Update FIMAdapter methods to respond with a simplified/flattened object.

Task

  • Add mapEntriesToModel around the response for each Adapter method in the FIMAdapter Class (See PIMAdapter Class for reference of usage).
  • Update to make to the mapEntriesToModel function to ensure the Faculty ("faculty" case should be "profile" instead) model is setup appropriately.

There's a method setup for getting all Contentful Entries (getAllContentfulEntries.php) that utilizes this function to map Contentful API's paginated responses to a PHP model class matching the content type. This flattens the response so that you can write relationships like program.banner.college.name instead of program.fields.banner.fields.college.fields.name.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions