public function findAllAvailable(array $enabledPlugins, $context = null)
    {
        $query = $this->createQueryBuilder('ds')
            ->leftJoin('ds.plugin', 'p')
            ->where('CONCAT(p.vendorName, p.bundleName) IN (:plugins)')
            ->setParameter('plugins', $enabledPlugins);

        if ($context) {
            $query
                ->andWhere('ds.context LIKE :context')
                ->setParameter('context', '%'.$context.'%');
        }

        return $query
            ->getQuery()
            ->getResult();
    }
public function findAllAvailable(array $enabledPlugins, $context = null)
    {
        $query = $this->createQueryBuilder('ds')
            ->leftJoin('ds.plugin', 'p')
            ->where('CONCAT(p.vendorName, p.bundleName) IN (:plugins)')
            ->setParameter('plugins', $enabledPlugins);

        if ($context) {
            $query
                ->andWhere('ds.context LIKE :context')
                ->setParameter('context', '%'.$context.'%');
        }

        return $query
            ->getQuery()
            ->getResult();
    }
public function findAllAvailable ( array $ enabledPlugins , $ context = null ) { $ query = $ this -> createQueryBuilder ( 'ds' ) -> leftJoin ( 'ds.plugin' , 'p' ) -> where ( 'CONCAT(p.vendorName, p.bundleName) IN (:plugins)' ) -> setParameter ( 'plugins' , $ enabledPlugins ) ; if ( $ context ) { $ query -> andWhere ( 'ds.context LIKE :context' ) -> setParameter ( 'context' , '%' . $ context . '%' ) ; } return $ query -> getQuery ( ) -> getResult ( ) ; }
Finds all available data sources in the platform.
It only grabs sources from enabled plugins.

@param array  $enabledPlugins
@param string $context

@return array
Finds all available data sources in the platform . It only grabs sources from enabled plugins .