You are here

public function MobileDetectDeviceType::summary in Mobile Detect 8.2

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

Overrides ConditionInterface::summary

File

src/Plugin/Condition/MobileDetectDeviceType.php, line 88

Class

MobileDetectDeviceType
Provides a 'Device type' condition.

Namespace

Drupal\mobile_detect\Plugin\Condition

Code

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