protected static function isHidden(AbstractRevision $revision)
 {
     return $revision->isModerated() && $revision->getModerationState() !== $revision::MODERATED_LOCKED;
 }
 protected function calcContentLength(AbstractRevision $revision)
 {
     if ($revision->isModerated() && !$revision->isLocked()) {
         return 0;
     } else {
         return $revision->getContentLength() ?: mb_strlen($revision->getContent('wikitext'));
     }
 }
 public function getModeratedRevision(AbstractRevision $revision)
 {
     if ($revision->isModerated()) {
         return $revision;
     } else {
         try {
             return Container::get('collection.cache')->getLastRevisionFor($revision);
         } catch (FlowException $e) {
             wfDebugLog('Flow', "Failed loading last revision for revid " . $revision->getRevisionId()->getAlphadecimal() . " with collection id " . $revision->getCollectionId()->getAlphadecimal());
             throw $e;
         }
     }
 }