Content object for articles representing Wikibase items.
More...
|
static | newFromItem (Item $item) |
| Create a new ItemContent object for the provided Item.
|
|
static | newFromRedirect (EntityRedirect $redirect, Title $redirectTitle) |
| Create a new ItemContent object representing a redirect to the given item ID.
|
|
Content object for articles representing Wikibase items.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
-
Bene* < benes.nosp@m.tar..nosp@m.wikim.nosp@m.edia.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
@method \Wikibase\Repo\Content\ItemHandler getContentHandler()
◆ __construct()
Wikibase\Repo\Content\ItemContent::__construct |
( |
EntityHolder | $itemHolder = null, |
|
|
EntityRedirect | $entityRedirect = null, |
|
|
Title | $redirectTitle = null ) |
Do not use to construct new stuff from outside of this class, use the static newFoobar methods.
In other words: treat as protected (which it was, but now cannot be since we derive from Content).
- Parameters
-
EntityHolder | null | $itemHolder | |
EntityRedirect | null | $entityRedirect | |
Title | null | $redirectTitle | Title of the redirect target. |
◆ getEntity()
Wikibase\Repo\Content\ItemContent::getEntity |
( |
| ) |
|
- See also
- EntityContent::getEntity
- Note
- This method cannot be called on redirects (targets will never be resolved)
- Returns
- Item
Reimplemented from Wikibase\Repo\Content\EntityContent.
◆ getEntityHolder()
Wikibase\Repo\Content\ItemContent::getEntityHolder |
( |
| ) |
|
◆ getEntityPageProperties()
Wikibase\Repo\Content\ItemContent::getEntityPageProperties |
( |
| ) |
|
- See also
- EntityContent::getEntityPageProperties
Records the number of statements in the 'wb-claims' key and the number of sitelinks in the 'wb-sitelinks' key.
- Returns
- array A map from property names to property values.
Reimplemented from Wikibase\Repo\Content\EntityContent.
◆ getEntityRedirect()
Wikibase\Repo\Content\ItemContent::getEntityRedirect |
( |
| ) |
|
◆ getIgnoreKeysForFilters()
Wikibase\Repo\Content\ItemContent::getIgnoreKeysForFilters |
( |
| ) |
|
|
protected |
Get the keys within this Contents Entity JSON that should be removed for text passed to edit filters.
- Returns
- string[] Keys to ignore
Reimplemented from Wikibase\Repo\Content\EntityContent.
◆ getItem()
Wikibase\Repo\Content\ItemContent::getItem |
( |
| ) |
|
- Note
- This method cannot be called on redirects (targets will never be resolved)
- Returns
- Item
◆ getRedirectTarget()
Wikibase\Repo\Content\ItemContent::getRedirectTarget |
( |
| ) |
|
- See also
- Content::getRedirectTarget
- Returns
- Title|null
◆ getTextForSearchIndex()
Wikibase\Repo\Content\ItemContent::getTextForSearchIndex |
( |
| ) |
|
◆ isEmpty()
Wikibase\Repo\Content\ItemContent::isEmpty |
( |
| ) |
|
◆ newFromItem()
static Wikibase\Repo\Content\ItemContent::newFromItem |
( |
Item | $item | ) |
|
|
static |
Create a new ItemContent object for the provided Item.
- Parameters
-
- Returns
- self
◆ newFromRedirect()
static Wikibase\Repo\Content\ItemContent::newFromRedirect |
( |
EntityRedirect | $redirect, |
|
|
Title | $redirectTitle ) |
|
static |
Create a new ItemContent object representing a redirect to the given item ID.
- Parameters
-
EntityRedirect | $redirect | |
Title | $redirectTitle | Title of the redirect target. |
- Returns
- self
◆ $itemHolder
Wikibase\Repo\Content\ItemContent::$itemHolder |
|
private |
◆ $redirect
Wikibase\Repo\Content\ItemContent::$redirect |
|
private |
◆ $redirectTitle
Wikibase\Repo\Content\ItemContent::$redirectTitle |
|
private |
◆ CONTENT_MODEL_ID
const Wikibase\Repo\Content\ItemContent::CONTENT_MODEL_ID = 'wikibase-item' |
The documentation for this class was generated from the following file: