src/ElementsExtension.php
public static function validate_class_inheritance(array $relation): array
    {
        return array_filter($relation, function($className)
        {
            if (
                ClassInfo::exists($className)
                && (is_a(singleton($className), ElementBase::class))
            ) {
                return $className;
            }
            user_error('Your element needs to extend from ' . ElementBase::class, E_USER_WARNING);
        });
    }
public static function validate_class_inheritance(array $relation): array
    {
        return array_filter($relation, function($className)
        {
            if (
                ClassInfo::exists($className)
                && (is_a(singleton($className), ElementBase::class))
            ) {
                return $className;
            }
            user_error('Your element needs to extend from ' . ElementBase::class, E_USER_WARNING);
        });
    }
public static function validate_class_inheritance ( array $ relation ) : array { return array_filter ( $ relation , function ( $ className ) { if ( ClassInfo :: exists ( $ className ) && ( is_a ( singleton ( $ className ) , ElementBase :: class ) ) ) { return $ className ; } user_error ( 'Your element needs to extend from ' . ElementBase :: class , E_USER_WARNING ) ; } ) ; }
Check if all provied classes derive from ElementBase.
@param  array  $relation
@return array
Check if all provied classes derive from ElementBase .