protected function ClassUtilsTrait::implementsInterface in Scheduled Updates 8
Determines if an object or class name implements any interfaces in a list.
Convenience function around class_implements.
Parameters
string|object $toCheck:
array $interfaces:
Return value
boolean
4 calls to ClassUtilsTrait::implementsInterface()
- ClassUtilsTrait::definitionClassImplementsInterface in src/
ClassUtilsTrait.php - Determines if the class for an entity type definition implements and interface.
- ClassUtilsTrait::getRevisionOwner in src/
ClassUtilsTrait.php - Get the revision owner for an ContentEntity.
- UpdateUtils::setRevisionCreationTime in src/
UpdateUtils.php - Set revision creation time for entities that support it.
- UpdateUtils::supportsRevisionBundleDefault in src/
UpdateUtils.php - Determine if the entity type being update support default revision setting.
File
- src/
ClassUtilsTrait.php, line 37 - Contains \Drupal\scheduled_updates\ClassUtilsTrait.
Class
- ClassUtilsTrait
- Trait for Class related functions.
Namespace
Drupal\scheduled_updatesCode
protected function implementsInterface($toCheck, array $interfaces) {
if (empty($toCheck)) {
return FALSE;
}
if (array_intersect($interfaces, class_implements($toCheck))) {
return TRUE;
}
return FALSE;
}