HomePhabricator

Provide a Taggable interface

Description

Provide a Taggable interface

The Taggable interface defines how to tag objects in MediaWiki.
For now there are only two Taggable objects:

  • RecentChange
  • ManualLogEntries

This interface should be used in places where we want to optionally
tag things, for example:
We want to tag all mobile web actions with 'web mobile edit'.

With that interface, we will be able to expect a Taggable object,
and call addTags() when we need to, without having a special check
to verify is it RecentChange, or is it ManualLogEntry. We will only
expect a Taggable object.

Additionally, added @deprecated note to ManualLogEntries::setTags()
as each call to this method will override all previous tags. This
action can be harmfull to parts of code that conditionally add tags.
If object was tagged in some way, we should preserve those tags.

If there are any special cases, where we want to override all tags,
we should provide resetTags() method.

Bug: T215675
Change-Id: Ia4c019db8ca6f37ce0f86bf7d134d6f1713daf56

Details

Provenance
polishdeveloperAuthored on Feb 28 2019, 5:24 PM
Parents
rMW5612194879bd: Merge "Password: update documentation"
Branches
Unknown
Tags
Unknown
ChangeId
Ia4c019db8ca6f37ce0f86bf7d134d6f1713daf56