class Utility in Commerce Migrate 3.0.x
Same name and namespace in other branches
- 8.2 src/Utility.php \Drupal\commerce_migrate\Utility
- 3.1.x src/Utility.php \Drupal\commerce_migrate\Utility
Class Utility.
@package Drupal\commerce_migrate
Hierarchy
- class \Drupal\commerce_migrate\Utility
Expanded class hierarchy of Utility
3 files declare their use of Utility
- commerce_migrate_ubercart.module in modules/
ubercart/ commerce_migrate_ubercart.module - Contains commerce_migrate_ubercart.module.
- PrepareRow.php in modules/
ubercart/ src/ EventSubscriber/ PrepareRow.php - ValidateMigrationStateTestTrait.php in modules/
ubercart/ tests/ src/ Kernel/ Traits/ ValidateMigrationStateTestTrait.php
File
- src/
Utility.php, line 10
Namespace
Drupal\commerce_migrateView source
class Utility {
/**
* Determine if a class is in a list of class names.
*
* @param object|string $className
* Class name of plugin.
* @param array $classes
* List of classes to compare.
* @param bool $allowString
* If set to FALSE, string class name as object is not allowed.
* This also prevents calling autoloader if the class doesn't exist.
*
* @return bool
* TRUE if it is a class in the list or else FALSE.
*/
public static function classInArray($className, array $classes, $allowString = TRUE) {
foreach ($classes as $class) {
if (is_a($className, $class, $allowString)) {
return TRUE;
}
}
return FALSE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Utility:: |
public static | function | Determine if a class is in a list of class names. |