public static function EntityUsageSourceLevel::isMiddleLevel in Entity Usage 8.3
Checks whether an entity is a middle-level entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity object we are dealing with.
Return value
bool TRUE if the entity passed in is a middle-level entity, FALSE otherwise.
Overrides EntityUsageSourceLevelInterface::isMiddleLevel
File
- src/
EntityUsageSourceLevel.php, line 32
Class
- EntityUsageSourceLevel
- Defines the interface for the service managing top-level source entities.
Namespace
Drupal\entity_usageCode
public static function isMiddleLevel(EntityInterface $entity) {
// For us all entities that are not bottom are middle.
return !self::isBottomLevel($entity);
}