BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
Review Class Reference
Inheritance diagram for Review:
Collaboration diagram for Review:

Public Member Functions

 getLogger ()
 
 logCreate ($type, $action, $title=NULL, $skin=NULL, $params=array(), $filterWikilinks=false)
 
 logModify ($type, $action, $title=NULL, $skin=NULL, $params=array(), $filterWikilinks=false)
 
 logDelete ($type, $action, $title=NULL, $skin=NULL, $params=array(), $filterWikilinks=false)
 
 logApprove ($type, $action, $title=NULL, $skin=NULL, $params=array(), $filterWikilinks=false)
 
 logDeny ($type, $action, $title=NULL, $skin=NULL, $params=array(), $filterWikilinks=false)
 
 logFinish ($type, $action, $title=NULL, $skin=NULL, $params=array(), $filterWikilinks=false)
 
 emailNotifyNextUsers ($oReviewProcess)
 
 runPreferencePlugin ($sAdapterName, $oVariable)
 
- Public Member Functions inherited from BsExtensionMW
 setCore ($oCore)
 
 getInfo ()
 
 setup ($sExtName="", $aConfig=array())
 
 setHook ($hook, $method=false, $bExecuteFirst=false)
 
 setContext (\IContextSource $context)
 
 setConfig (\Config $config)
 
 getResourcePath ()
 
 getName ()
 
 getExtensionKey ()
 
 getExtensionPath ()
 
 getImagePath ($bResources=false)
 
 getCacheKey ($sSubKey= 'default')
 
 makeTagExtensionDefinitions ()
 
- Public Member Functions inherited from BlueSpice\Extension
 jsonSerialize ()
 
 __construct (array $definition,\IContextSource $context,\Config $config)
 
 getInfo ()
 
 getResourcePath ()
 
 getExtensionPath ()
 
 getName ()
 
 getAuthors ()
 
 getStatus ()
 
 getPackage ()
 
 getUrl ()
 
 getVersion ()
 
 getExtensionKey ()
 
- Public Member Functions inherited from BlueSpice\Context
 __construct (\IContextSource $context,\Config $config)
 
 canUseWikiPage ()
 
 exportSession ()
 
 getConfig ()
 
 getLanguage ()
 
 getOutput ()
 
 getRequest ()
 
 getSkin ()
 
 getStats ()
 
 getTiming ()
 
 getTitle ()
 
 getUser ()
 
 getWikiPage ()
 
 msg ($key)
 

Static Public Member Functions

static onEchoGetDefaultNotifiedUsers ($event, &$users)
 
static getSchemaUpdates ($updater)
 
static onStatebarAddSortTopVars (&$aSortTopVars)
 
static onStatebarAddSortBodyVars (&$aSortBodyVars)
 
static onSkinTemplateNavigation (SkinTemplate $oSkinTemplate, &$links)
 
static getData ()
 
static checkReviewPermissions ($oTitle, $oUser, $sAction, &$bRight)
 
static onBSFlaggedRevsConnectorCollectFlagInfo ($oCurrentTitle, &$aFlagInfo)
 
static doEditReview (Title $oTitle, stdClass $oParams, User $oUser=null, BsReviewProcess $oReviewProcess=null)
 
static doDeleteReview (Title $oTitle, User $oUser=null, BsReviewProcess $oReviewProcess=null)
 
static userCanEdit (BsReviewProcess $oReviewProcess, User $oUser=null)
 
static onStateBarBeforeTopViewAdd ($oStateBar, &$aTopViews, $oUser, $oTitle)
 
static onStateBarBeforeBodyViewAdd ($oStateBar, &$aBodyViews, $oUser, $oTitle)
 
static makeStateBarTopReview ($sIcon, Title $oTitle)
 
static onBSUserSidebarGlobalActionsWidgetGlobalActions (UserSidebar $oUserSidebar, User $oUser, &$aLinks, &$sWidgetTitle)
 
static onSkinTemplateOutputPageBeforeExec (&$sktemplate, &$tpl)
 
static doVote (Title $oTitle, stdClass $oParams=null, User $oUser=null)
 
static onArticleDeleteComplete (&$article, &$user, $reason, $id)
 
static onBeforePageDisplay (&$out, &$skin)
 
static onRegistration ()
 
static smwDataMapping (SMW\SemanticData $oSemanticData, WikiPage $oWikiPage, SMW\DIProperty $oProperty)
 
static onBSUsageTrackerRegisterCollectors (&$aCollectorsConfig)
 
static onUserGetRights (User $user, &$aRights)
 
static onUnitTestsList (array &$paths)
 

Protected Member Functions

 initExt ()
 
- Protected Member Functions inherited from BsExtensionMW
 initExt ()
 

Static Protected Member Functions

static makeJSDataObject ($oReview, Title $oTitle)
 

Protected Attributes

 $oLogger
 
- Protected Attributes inherited from BsExtensionMW
 $mExtensionKey = null
 
 $mExtensionFile = null
 
 $mExtensionType = null
 
 $mInfo = null
 
 $mResourcePath = null
 
 $sName = ''
 
 $sStatus = ''
 
 $sPackage = ''
 
 $mCore = null
 
 $aStandardContext = array( '*', '*', '*' )
 
- Protected Attributes inherited from BlueSpice\Extension
 $extPath = ''
 
 $name = ''
 
 $authors = []
 
 $version = ''
 
 $url = ''
 
 $status = ''
 
 $package = ''
 
- Protected Attributes inherited from BlueSpice\Context
 $context = null
 
 $config = null
 

Static Protected Attributes

static $sTempGroup = 'bsreviewtmpgrp907678678'
 
static $aPermissionWhiteList = [ 'read', 'workflowedit', 'workflowview', 'universalexport-export' ]
 

Member Function Documentation

static Review::checkReviewPermissions (   $oTitle,
  $oUser,
  $sAction,
$bRight 
)
static

Can a user edit a particular page?

Parameters
Title$oTitleTitle object of current page.
User$oUserCurrently authenticated user.
string$sActionAction for which a permission is being requested.
bool$bRightIs user currently allowed to do the action on the page? If this is set to false, permission will be denied.
Returns
bool Allow other hooked methods to be executed. False if edit right is denied.
static Review::doDeleteReview ( Title  $oTitle,
User  $oUser = null,
BsReviewProcess  $oReviewProcess = null 
)
static

Deletes a review process

Parameters
Title$oTitle
User$oUser
BsReviewProcess$oReviewProcess
Returns
Status
static Review::doEditReview ( Title  $oTitle,
stdClass  $oParams,
User  $oUser = null,
BsReviewProcess  $oReviewProcess = null 
)
static

Edits a review process

Parameters
Title$oTitle
stdClass$oParams
User$oUser
BsReviewProcess$oReviewProcess
Returns
Status
static Review::doVote ( Title  $oTitle,
stdClass  $oParams = null,
User  $oUser = null 
)
static

Handles Review votes.

Parameters
Title$oTitle
stdClass$oParams- Known param keys are vote and comment
User$oUser
Returns
Status - Use Status->getValue() to get the BsRevieProcess on a good Status
Review::emailNotifyNextUsers (   $oReviewProcess)

Send email notification to next user(s) on review list.

Parameters
BsReviewProcess$oReviewProcessReview process users should be notified for.
Returns
Status
Review::getLogger ( )
Returns
LogPage
static Review::getSchemaUpdates (   $updater)
static

Sets up required database tables

Parameters
DatabaseUpdater$updaterProvided by MediaWikis update.php
Returns
boolean Always true to keep the hook running
Review::initExt ( )
protected

Initialization of Review extension

Review::logApprove (   $type,
  $action,
  $title = NULL,
  $skin = NULL,
  $params = array(),
  $filterWikilinks = false 
)

Produces a log message for bs-review/approve.

Parameters
string$typeLog type as defined for MediaWiki.
string$actionLog type as defined for MediaWiki.
Title$titleTitle of the page for which an action is being logged.
Skin$skinSkin object.
array$paramsNot used.
bool$filterWikilinksNot used.
Returns
string Internationalized log message.
Review::logCreate (   $type,
  $action,
  $title = NULL,
  $skin = NULL,
  $params = array(),
  $filterWikilinks = false 
)

Produces a log message for bs-review/create.

Parameters
string$typeLog type as defined for MediaWiki.
string$actionLog type as defined for MediaWiki.
Title$titleTitle of the page for which an action is being logged.
Skin$skinSkin object.
array$paramsNot used.
bool$filterWikilinksNot used.
Returns
string Internationalized log message.
Review::logDelete (   $type,
  $action,
  $title = NULL,
  $skin = NULL,
  $params = array(),
  $filterWikilinks = false 
)

Produces a log message for bs-review/delete.

Parameters
string$typeLog type as defined for MediaWiki.
string$actionLog type as defined for MediaWiki.
Title$titleTitle of the page for which an action is being logged.
Skin$skinSkin object.
array$paramsNot used.
bool$filterWikilinksNot used.
Returns
string Internationalized log message.
Review::logDeny (   $type,
  $action,
  $title = NULL,
  $skin = NULL,
  $params = array(),
  $filterWikilinks = false 
)

Produces a log message for bs-review/Deny.

Parameters
string$typeLog type as defined for MediaWiki.
string$actionLog type as defined for MediaWiki.
Title$titleTitle of the page for which an action is being logged.
Skin$skinSkin object.
array$paramsNot used.
bool$filterWikilinksNot used.
Returns
string Internationalized log message.
Review::logFinish (   $type,
  $action,
  $title = NULL,
  $skin = NULL,
  $params = array(),
  $filterWikilinks = false 
)

Produces a log message for bs-review/finish.

Parameters
string$typeLog type as defined for MediaWiki.
string$actionLog type as defined for MediaWiki.
Title$titleTitle of the page for which an action is being logged.
Skin$skinSkin object.
array$paramsNot used.
bool$filterWikilinksNot used.
Returns
string Internationalized log message.
Review::logModify (   $type,
  $action,
  $title = NULL,
  $skin = NULL,
  $params = array(),
  $filterWikilinks = false 
)

Produces a log message for bs-review/modify.

Parameters
string$typeLog type as defined for MediaWiki.
string$actionLog type as defined for MediaWiki.
Title$titleTitle of the page for which an action is being logged.
Skin$skinSkin object.
array$paramsNot used.
bool$filterWikilinksNot used.
Returns
string Internationalized log message.
static Review::makeJSDataObject (   $oReview,
Title  $oTitle 
)
staticprotected

Adds information to an data object that is needed to properly initialise 'BS.Review.ReviewPanel'

Parameters
BsReviewProcess$oReview
Returns
static Review::makeStateBarTopReview (   $sIcon,
Title  $oTitle 
)
static

Renders status output to StatusBar top secion.

Parameters
string$sIconFilename of the icon to be displayed. Relative to extension image dir.
Returns
ViewStateBarTopElement View that is part of StateBar.
static Review::onArticleDeleteComplete ( $article,
$user,
  $reason,
  $id 
)
static

Remove review when an article is deleted.

Parameters
Article$articleArticle object of deleted article.
User$userCurrently logged in user.
string$reasonReason for page deletion.
int$idID of the page deleted.
Returns
bool Allow other hooked methods to be executed. always true.
static Review::onBeforePageDisplay ( $out,
$skin 
)
static

Adds CSS to Page

Parameters
OutputPage$out
Skin$skin
Returns
boolean
static Review::onBSFlaggedRevsConnectorCollectFlagInfo (   $oCurrentTitle,
$aFlagInfo 
)
static

Prevents the FlaggedRevsConnector form from being shown when a workflow is active

Parameters
Title$oCurrentTitle
array$aFlagInfo
Returns
boolean
static Review::onBSUsageTrackerRegisterCollectors ( $aCollectorsConfig)
static

Register tag with UsageTracker extension

Parameters
array$aCollectorsConfig
Returns
Always true to keep hook running
static Review::onBSUserSidebarGlobalActionsWidgetGlobalActions ( UserSidebar  $oUserSidebar,
User  $oUser,
$aLinks,
$sWidgetTitle 
)
static

Adds Special:Review link to wiki wide widget

Parameters
UserSidebar$oUserSidebar
User$oUser
array$aLinks
string$sWidgetTitle
Returns
boolean
static Review::onRegistration ( )
static

extension.json callback

static Review::onSkinTemplateNavigation ( SkinTemplate  $oSkinTemplate,
$links 
)
static

Adds the "Review" menu entry in view mode

Parameters
SkinTemplate$oSkinTemplate
array$links
Returns
boolean Always true to keep hook running
static Review::onSkinTemplateOutputPageBeforeExec ( $sktemplate,
$tpl 
)
static

Adds a info to bs_personal_info

Parameters
SkinTemplate$sktemplate
BaseTemplate$tpl
Returns
boolean Always true to keep hook running
static Review::onStatebarAddSortBodyVars ( $aSortBodyVars)
static

Hook-Handler for Hook 'BSStatebarAddSortBodyVars'

Parameters
array$aSortBodyVars
Returns
boolean Always true to keep hook running
static Review::onStatebarAddSortTopVars ( $aSortTopVars)
static

Hook-Handler for Hook 'BSStatebarAddSortTopVars'

Parameters
array$aSortTopVars
Returns
boolean Always true to keep hook running
static Review::onStateBarBeforeBodyViewAdd (   $oStateBar,
$aBodyViews,
  $oUser,
  $oTitle 
)
static

Hook-Handler for Hook 'BSStateBarBeforeBodyViewAdd'

Parameters
StateBar$oStateBar
array$aBodyViews
Returns
boolean Always true to keep hook running
static Review::onStateBarBeforeTopViewAdd (   $oStateBar,
$aTopViews,
  $oUser,
  $oTitle 
)
static

Hook-Handler for Hook 'BSStateBarBeforeTopViewAdd'

Parameters
StateBar$oStateBar
User$oUser
Title$oTitle
array$aTopViews
Returns
boolean Always true to keep hook running
static Review::onUnitTestsList ( array &  $paths)
static

UnitTestsList allows registration of additional test suites to execute under PHPUnit. Extensions can append paths to files to the $paths array, and since MediaWiki 1.24, can specify paths to directories, which will be scanned recursively for any test case files with the suffix "Test.php".

Parameters
array$paths
static Review::onUserGetRights ( User  $user,
$aRights 
)
static

Add edit right permission for current logged in user if review process add edit permission

Parameters
User$user
type$rights
Returns
boolean
Review::runPreferencePlugin (   $sAdapterName,
  $oVariable 
)

The preferences plugin callback

Parameters
string$sAdapterName
BsConfig$oVariable
Returns
array MediaWiki preferences options array
static Review::smwDataMapping ( SMW\SemanticData  $oSemanticData,
WikiPage  $oWikiPage,
SMW\DIProperty  $oProperty 
)
static

Callback for BlueSpiceSMWConnector that adds a semantic special property

Parameters
SMW\SemanticData$oSemanticData
WikiPage$oWikiPage
SMW\DIProperty$oProperty

The documentation for this class was generated from the following file: