Discussed with nod_, he agrees. This will significantly simplify long-term maintenance of the Drupal 7 Edit module, because it will very closely resemble the Drupal 8 equivalent, which is almost guaranteed to receive more attention.
This is part of #1947802: Clean up Edit's PHP to make it more maintainable: Drupal 8-style in-place editor definitions.
Comments
Comment #1
wim leersMetadataGenerator(Interface),EditorSelector(Interface)andEditEntityFieldAccessCheck(Interface). This has allowed a lot of code to be removed from pages.inc. The remaining code is now fully documented. It will also simplify adding test coverage, because it should be possible to mostly copy the tests from Drupal 8 (same logic, different syntax & function calls).hook_edit_extra_fields_info()to allow us to cleanly specify "extra fields" for Edit, along with all necessary metadata to make them in-place editable. This effectively means that it makes it possible to make *anything* on an entity that is not part of Field API in-place editable. Hence, it closes #1895526: Add a way to make things that don't use Field API in-place editable.Currently only node.module is supported, see the new node.inc. Consequently, it made sense to move the special handling for node title/author/date in fape.inc out of there and into node.inc.
This new hook/API is not yet documented, because I want to make sure first that it is sufficiently flexible and complete. See node.inc as the guiding example for now.
hook_edit_editor_metadata_alter()made little sense: parts of its$contextwere invalid, the$editorparameter was pointless because that information is already inside$metadatahttp://drupalcode.org/project/edit.git/commit/8ec0760