Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\PageTranslation\TranslatablePageView Class Reference

Logic and code to generate various aspects related to how translatable pages are displayed. More...

Public Member Functions

 __construct (IConnectionProvider $connectionProvider, TranslatablePageStateStore $translatablePageStateStore, ServiceOptions $options)
 
 canManageTranslationSettings (Title $articleTitle, User $user)
 Determines whether the user should be allowed to update the translation setting.
 
 canDisplayTranslationSettingsBanner (Title $articleTitle, User $user)
 Determines whether the banner to mark a page for translation should be displayed.
 
 isTranslationBannerNamespaceConfigured ()
 

Public Attributes

const SERVICE_OPTIONS = [ 'TranslatePageTranslationBannerNamespaces' ]
 

Detailed Description

Logic and code to generate various aspects related to how translatable pages are displayed.

Author
Abijeet Patro @license GPL-2.0-or-later
Since
2024.05

Definition at line 18 of file TranslatablePageView.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageView::__construct ( IConnectionProvider $connectionProvider,
TranslatablePageStateStore $translatablePageStateStore,
ServiceOptions $options )

Definition at line 26 of file TranslatablePageView.php.

Member Function Documentation

◆ canDisplayTranslationSettingsBanner()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageView::canDisplayTranslationSettingsBanner ( Title $articleTitle,
User $user )

Determines whether the banner to mark a page for translation should be displayed.

Definition at line 49 of file TranslatablePageView.php.

◆ canManageTranslationSettings()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageView::canManageTranslationSettings ( Title $articleTitle,
User $user )

Determines whether the user should be allowed to update the translation setting.

Definition at line 38 of file TranslatablePageView.php.

◆ isTranslationBannerNamespaceConfigured()

MediaWiki\Extension\Translate\PageTranslation\TranslatablePageView::isTranslationBannerNamespaceConfigured ( )

Definition at line 71 of file TranslatablePageView.php.

Member Data Documentation

◆ SERVICE_OPTIONS

const MediaWiki\Extension\Translate\PageTranslation\TranslatablePageView::SERVICE_OPTIONS = [ 'TranslatePageTranslationBannerNamespaces' ]

Definition at line 19 of file TranslatablePageView.php.


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