You are here

public function IndeterminateBundleException::matched in Lightning Media 8.3

Same name and namespace in other branches
  1. 8.4 src/Exception/IndeterminateBundleException.php \Drupal\lightning_media\Exception\IndeterminateBundleException::matched()

Checks if the input value matched a particular media type.

Parameters

string $type: The media type ID to check.

Return value

bool TRUE if the input value matched the media type, otherwise FALSE.

File

src/Exception/IndeterminateBundleException.php, line 58

Class

IndeterminateBundleException
Thrown if no single media type can be determined from an input value.

Namespace

Drupal\lightning_media\Exception

Code

public function matched($type) {
  return array_key_exists($type, $this->types);
}