+ public static function getSoftwareTags( $all = false ) {
+ global $wgSoftwareTags;
+ $softwareTags = [];
+
+ if ( !is_array( $wgSoftwareTags ) ) {
+ wfWarn( 'wgSoftwareTags should be associative array of enabled tags.
+ Please refer to documentation for the list of tags you can enable' );
+ return $softwareTags;
+ }
+
+ $availableSoftwareTags = !$all ?
+ array_keys( array_filter( $wgSoftwareTags ) ) :
+ array_keys( $wgSoftwareTags );
+
+ $softwareTags = array_intersect(
+ $availableSoftwareTags,
+ self::$definedSoftwareTags
+ );
+
+ return $softwareTags;
+ }