You are here

public function MobileDetectPlatform::summary in Mobile Detect 8.2

Provides a human readable summary of the condition's configuration.

Overrides ConditionInterface::summary

File

src/Plugin/Condition/MobileDetectPlatform.php, line 85

Class

MobileDetectPlatform
Provides the 'Device platform' condition.

Namespace

Drupal\mobile_detect\Plugin\Condition

Code

public function summary() {
  $platform = implode(', ', $this->configuration['platform']);
  return $this
    ->isNegated() ? $this
    ->t('The current platform is not @platform', [
    '@platform' => $platform,
  ]) : $this
    ->t('The current platform is @platform', [
    '@platform' => $platform,
  ]);
}