MediaWiki master
ApiBlockInfoTrait.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Api;
8
12
17
37 private function getBlockDetails(
38 Block $block,
39 $language = null
40 ) {
41 return ( new ApiBlockInfoHelper )->getBlockDetails(
42 $block, $language ?? $this->getLanguage(), $this->getUser() );
43 }
44
50 private function getBlockCode( Block $block ): string {
51 return ( new ApiBlockInfoHelper )->getBlockCode( $block );
52 }
53
54 // region Methods required from ApiBase
63 abstract public function getLanguage();
64
69 abstract public function getUser();
70
72 // endregion -- end of methods required from ApiBase
73
74}
75
77class_alias( ApiBlockInfoTrait::class, 'ApiBlockInfoTrait' );
Helper class for API modules that display block information.
Base class for language-specific code.
Definition Language.php:68
Represents a block that may prevent users from performing specific operations.
Definition Block.php:31
Interface for objects representing user identity.