X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FStorage%2FRevisionSlots.php;h=7fa5431d383ffdf106ddeebddad2317b2a49c965;hb=cc1191e5bdd5b4878ee29fc0b103e55420011e92;hp=8d3d7e3d70ae31eb875c9126d0ded677843f7c2f;hpb=58858df842f91d9ea1c9f9b6f3c767d8b204886b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Storage/RevisionSlots.php b/includes/Storage/RevisionSlots.php index 8d3d7e3d70..7fa5431d38 100644 --- a/includes/Storage/RevisionSlots.php +++ b/includes/Storage/RevisionSlots.php @@ -110,6 +110,19 @@ class RevisionSlots { } } + /** + * Returns whether the given slot is set. + * + * @param string $role The role name of the desired slot + * + * @return bool + */ + public function hasSlot( $role ) { + $slots = $this->getSlots(); + + return isset( $slots[$role] ); + } + /** * Returns the slot names (roles) of all slots present in this revision. * getContent() will succeed only for the names returned by this method.