* @return bool
*/
public function getFlip( $context ) {
- global $wgContLang;
-
- return $wgContLang->getDir() !== $context->getDirection();
+ return MediaWikiServices::getInstance()->getContentLanguage()->getDir() !==
+ $context->getDirection();
}
/**
* Note: It is expected that $context will be made non-optional in the near
* future.
*
- * @param ResourceLoaderContext $context
+ * @param ResourceLoaderContext|null $context
* @return array List of module names as strings
*/
public function getDependencies( ResourceLoaderContext $context = null ) {