Skip to content

Implement Timber::get_menu() and Timber::get_user() methods. #2089

@acobster

Description

@acobster

Is your feature request related to a problem? Please describe.

Per #2073 and #2088, we're making Menu, User, and Comment constructors protected.

For more context, see the linked issues.

Acceptance Criteria

  • Implement static Timber::get_menu() method which in turn call the appropriate factory methods (factory implementations themselves are out of scope here)
  • Ditto Timber::get_user()
  • Ditto Timber::get_comment()
  • Implement Timber::get_users() methods for getting collections.
  • Ditto Timber::get_comments()
  • Determine whether we need a ::get_menus() method? (No - see discussion.)
  • Determine which hooks, if any, we need to apply before instantiating Menu or User objects (should they get their own class maps?)
  • Implement Class Maps for MenuItem
  • Implement tests for these methods.

Describe alternatives you’ve considered

The alternative is having an inconsistent API, which I personally don't find acceptable.

Additional context

See #1793 for how this all got started.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions