You are here

public function BusinessRulesItemBase::getTypeLabel in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/Entity/BusinessRulesItemBase.php \Drupal\business_rules\Entity\BusinessRulesItemBase::getTypeLabel()

Get the readable Type label.

Return value

string The readable Type label.

Overrides ItemInterface::getTypeLabel

File

src/Entity/BusinessRulesItemBase.php, line 218

Class

BusinessRulesItemBase
Class Item.

Namespace

Drupal\business_rules\Entity

Code

public function getTypeLabel() {
  $types = $this
    ->getTypes();
  foreach ($types as $type) {
    foreach ($type as $key => $value) {
      if ($key == $this
        ->getType()) {
        return $value;
      }
    }
  }
  return '';
}