Page MenuHomePhabricator

Consider creating new Webpage objects via the Domain object
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):

Instead of creating new Webpage objects directly, provide a Domain method to create them.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

When a webpage needs to be translated, or a template needs to be created, a Webpage object must be instantiated. These Webpage objects are necessarily attached to the Domain object.

Benefits (why should this be implemented?):

Creating Webpage objects via the Domain object makes sure both have the same domain, and simplifies the API's surface.

Possibly related to T302239

Event Timeline

diegodlh claimed this task.
diegodlh moved this task from Backlog to Done on the Web2Cit-Core board.

Fixed in test-configuration branch. The Domain object now includes a WebpageFactory object, with a getWebpage method.