main/core/Controller/APINew/DataSourceController.php
public function listAction($context = null)
    {
        $widgets = $this->manager->getAvailable($context);

        return new JsonResponse(array_map(function (DataSource $dataSource) {
            return $this->serializer->serialize($dataSource);
        }, $widgets));
    }
public function listAction($context = null)
    {
        $widgets = $this->manager->getAvailable($context);

        return new JsonResponse(array_map(function (DataSource $dataSource) {
            return $this->serializer->serialize($dataSource);
        }, $widgets));
    }
public function listAction ( $ context = null ) { $ widgets = $ this -> manager -> getAvailable ( $ context ) ; return new JsonResponse ( array_map ( function ( DataSource $ dataSource ) { return $ this -> serializer -> serialize ( $ dataSource ) ; } , $ widgets ) ) ; }
Lists available data sources for a given context.

@EXT\Route("/{context}", name="apiv2_data_source_list", defaults={"context"=null})
@EXT\Method("GET")

@param string $context

@return JsonResponse
Lists available data sources for a given context .