Page MenuHomePhabricator

Add mechanism for registering new entity types, to work with things like EntityViewFactory
Closed, DuplicatePublic


We need a mechanism for registering new entity types, to work with things like EntityViewFactory. We also have things like ActionOverrides registered in each ContentHandler class, but these could benefit from instead being callbacks and thus maybe belong in a factory as well.

for content model mappings, we have:

public function getContentModelMappings() {                                                         
    // @TODO: We should have smth. like this for namespaces too                                     
    $map = array(                                                                                   
        Item::ENTITY_TYPE => CONTENT_MODEL_WIKIBASE_ITEM,                                           
        Property::ENTITY_TYPE => CONTENT_MODEL_WIKIBASE_PROPERTY                                    
    wfRunHooks( 'WikibaseContentModelMapping', array( &$map ) );                                    
    return $map;                                                                                    

Would we want more hooks like these to achieve this, or some sort of registry (at least factor out all these related methods from the top level factory)?

Event Timeline

aude created this task.Dec 9 2014, 1:09 PM
aude raised the priority of this task from to Needs Triage.
aude updated the task description. (Show Details)
aude added a project: Wikidata.
aude changed Security from none to None.
aude added a subscriber: aude.
JeroenDeDauw closed this task as Invalid.Feb 26 2015, 7:15 PM
JeroenDeDauw claimed this task.

This is a duplicate of

There is no duplicate status? Setting to invalid, please change if there is something more appropriate

JanZerebecki reopened this task as Open.Feb 27 2015, 11:08 AM

On the right there is a button Merge Duplicates In.