public static function get_all_targets() : array {
        if (self::$alltargets !== null) {
            return self::$alltargets;
        }

        $classes = self::get_analytics_classes('target');

        self::$alltargets = [];
        foreach ($classes as $fullclassname => $classpath) {
            $instance = self::get_target($fullclassname);
            if ($instance) {
                self::$alltargets[$instance->get_id()] = $instance;
            }
        }

        return self::$alltargets;
    }
public static function get_all_targets() : array {
        if (self::$alltargets !== null) {
            return self::$alltargets;
        }

        $classes = self::get_analytics_classes('target');

        self::$alltargets = [];
        foreach ($classes as $fullclassname => $classpath) {
            $instance = self::get_target($fullclassname);
            if ($instance) {
                self::$alltargets[$instance->get_id()] = $instance;
            }
        }

        return self::$alltargets;
    }
public static function get_all_targets ( ) : array { if ( self :: $ alltargets !== null ) { return self :: $ alltargets ; } $ classes = self :: get_analytics_classes ( 'target' ) ; self :: $ alltargets = [ ] ; foreach ( $ classes as $ fullclassname => $ classpath ) { $ instance = self :: get_target ( $ fullclassname ) ; if ( $ instance ) { self :: $ alltargets [ $ instance -> get_id ( ) ] = $ instance ; } } return self :: $ alltargets ; }
Return all targets in the system.

@return \core_analytics\local\target\base[]
Return all targets in the system .