Problem/Motivation
Activity type plugins will provide business logic to the activity entities.
Proposed resolution
- create plugin manager service
- create ActivityTypePluginInterface and add two functions to it
- create abstract base plugin class that provides default implementations for both fucntions (label displays the contents of the label field on the activity entity and display returns an empty render array for now)
- create "Generic" plugin that extends base class and basically reuses it's logic for now
- expose plugin type so Plugin module will be able to discover it (see http://cgit.drupalcode.org/plugin/tree/PLUGIN_TYPES.md)
- add test coverage
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff-2714233-6.txt | 4.32 KB | thenchev |
#6 | create_activity_type-2714233-6.patch | 8.37 KB | thenchev |
#4 | interdiff-2714233-4.txt | 584 bytes | thenchev |
#4 | create_activity_type-2714233-4.patch | 8.56 KB | thenchev |
#3 | create_activity_type-2714233-3.patch | 8.56 KB | thenchev |
Comments
Comment #2
thenchev CreditAttribution: thenchev at MD Systems GmbH commentedComment #3
thenchev CreditAttribution: thenchev at MD Systems GmbH commentedInitial patch. Integration with Plugin module is optional so are we creating some tests for that? Asserting that there is admin/structure/plugin/ActivityTypePlugin
Comment #4
thenchev CreditAttribution: thenchev at MD Systems GmbH commentedNot quite sure what to add to the schema.
Comment #5
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedWe actually don't need any schema here for now. Plugin configuration array will be part of the activity bundle and each plugin will need to provide its own schema for it.
Use snake case. Put label and description strings in quotes. Label should be something like "Activity type"
Newline.
".. to get the label for." or even "...to build the label for."
Typehint ActivityInterface.
add @return. Will need activity entity too.
Comment #6
thenchev CreditAttribution: thenchev at MD Systems GmbH commentedComment #8
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedCommitted. Thanks!