You are here

public function FeaturesManager::statusLabel in Features 8.3

Same name and namespace in other branches
  1. 8.4 src/FeaturesManager.php \Drupal\features\FeaturesManager::statusLabel()

Helper function that returns a translatable label for the different status constants.

Parameters

int $status: A status constant.

Return value

string A translatable label.

Overrides FeaturesManagerInterface::statusLabel

File

src/FeaturesManager.php, line 1374

Class

FeaturesManager
The FeaturesManager provides helper functions for building packages.

Namespace

Drupal\features

Code

public function statusLabel($status) {
  switch ($status) {
    case FeaturesManagerInterface::STATUS_NO_EXPORT:
      return $this
        ->t('Not exported');
    case FeaturesManagerInterface::STATUS_UNINSTALLED:
      return $this
        ->t('Uninstalled');
    case FeaturesManagerInterface::STATUS_INSTALLED:
      return $this
        ->t('Installed');
  }
}