MediaWiki
master
|
Public Member Functions | ||||
getTitle () | ||||
matches (Title $title) | ||||
Determine if a restriction matches a given title.
| ||||
setTitle (Title $title) | ||||
![]() | ||||
__construct ( $blockId, $value) | ||||
Create Restriction. More... | ||||
equals (Restriction $other) | ||||
Determine if a restriction equals another restriction.
| ||||
getBlockId () | ||||
Gets the id of the block.
| ||||
getHash () | ||||
Create a unique hash of the block restriction based on the type and value.
| ||||
getValue () | ||||
Gets the value of the restriction.
| ||||
setBlockId ( $blockId) | ||||
Sets the id of the block.
| ||||
toRow () | ||||
Convert a restriction object into a row array for insertion.
| ||||
Static Public Member Functions | ||||
static | newFromRow (\stdClass $row) | |||
Creates a new Restriction from a database row.
| ||||
static | newFromTitle ( $title) | |||
![]() | ||||
static | getType () | |||
Gets the type of restriction.
| ||||
static | getTypeId () | |||
Gets the id of the type of restriction.This id is used in the database.
| ||||
Public Attributes | |
const | TYPE = 'page' |
const | TYPE_ID = 1 |
![]() | |
const | TYPE = '' |
String constant identifying the type of restriction. More... | |
const | TYPE_ID = 0 |
Numeric type identifier. More... | |
Protected Attributes | |
Title false null | $title |
![]() | |
int | $blockId |
int | $value |
Definition at line 27 of file PageRestriction.php.
MediaWiki\Block\Restriction\PageRestriction::getTitle | ( | ) |
Definition at line 70 of file PageRestriction.php.
References MediaWiki\Block\Restriction\PageRestriction\$title, and MediaWiki\Title\Title\newFromID().
Referenced by MediaWiki\Block\Restriction\PageRestriction\matches(), and MediaWiki\Specials\SpecialBlock\maybeAlterFormDefaults().
MediaWiki\Block\Restriction\PageRestriction::matches | ( | Title | $title | ) |
Determine if a restriction matches a given title.
Title | $title |
Implements MediaWiki\Block\Restriction\Restriction.
Definition at line 47 of file PageRestriction.php.
References MediaWiki\Title\Title\equals(), and MediaWiki\Block\Restriction\PageRestriction\getTitle().
|
static |
Creates a new Restriction from a database row.
\\stdClass | $row |
Reimplemented from MediaWiki\Block\Restriction\AbstractRestriction.
Definition at line 81 of file PageRestriction.php.
References MediaWiki\Block\Restriction\PageRestriction\$title, and MediaWiki\Title\Title\newFromRow().
|
static |
string | Title | $title |
Definition at line 105 of file PageRestriction.php.
References MediaWiki\Block\Restriction\PageRestriction\$title, MediaWiki\Title\Title\getArticleID(), and MediaWiki\Title\Title\newFromText().
MediaWiki\Block\Restriction\PageRestriction::setTitle | ( | Title | $title | ) |
Title | $title |
Definition at line 60 of file PageRestriction.php.
References MediaWiki\Block\Restriction\PageRestriction\$title.
|
protected |
const MediaWiki\Block\Restriction\PageRestriction::TYPE = 'page' |
Definition at line 32 of file PageRestriction.php.
const MediaWiki\Block\Restriction\PageRestriction::TYPE_ID = 1 |
Definition at line 37 of file PageRestriction.php.
Referenced by MediaWiki\Block\BlockRestrictionStore\loadByBlockId().