concrete/src/Captcha/Library.php
public static function getListByPackage($pkg)
    {
        if (is_object($pkg)) {
            $pkgID = $pkg->getPackageID();
        } else {
            $pkgID = (int) $pkg;
        }
        $app = Facade::getFacadeApplication();
        $db = $app->make('database')->connection();
        $libraries = [];
        foreach ($db->fetchAll('select sclHandle from SystemCaptchaLibraries where pkgID = ? order by sclHandle asc', [$pkgID]) as $row) {
            $scl = static::getByHandle($row['sclHandle']);
            $libraries[] = $scl;
        }

        return $libraries;
    }
public static function getListByPackage($pkg)
    {
        if (is_object($pkg)) {
            $pkgID = $pkg->getPackageID();
        } else {
            $pkgID = (int) $pkg;
        }
        $app = Facade::getFacadeApplication();
        $db = $app->make('database')->connection();
        $libraries = [];
        foreach ($db->fetchAll('select sclHandle from SystemCaptchaLibraries where pkgID = ? order by sclHandle asc', [$pkgID]) as $row) {
            $scl = static::getByHandle($row['sclHandle']);
            $libraries[] = $scl;
        }

        return $libraries;
    }
public static function getListByPackage ( $ pkg ) { if ( is_object ( $ pkg ) ) { $ pkgID = $ pkg -> getPackageID ( ) ; } else { $ pkgID = ( int ) $ pkg ; } $ app = Facade :: getFacadeApplication ( ) ; $ db = $ app -> make ( 'database' ) -> connection ( ) ; $ libraries = [ ] ; foreach ( $ db -> fetchAll ( 'select sclHandle from SystemCaptchaLibraries where pkgID = ? order by sclHandle asc' , [ $ pkgID ] ) as $ row ) { $ scl = static :: getByHandle ( $ row [ 'sclHandle' ] ) ; $ libraries [ ] = $ scl ; } return $ libraries ; }
Retrieve the libraries installed by a package.

@param \Concrete\Core\Entity\Package|int $pkg the package instance (or its ID)

@return static[]
Retrieve the libraries installed by a package .