Gets Textpacks.

@return string
770270
protected function textpack()
    {
        $textpacks = $this->dir . '/textpacks';

        if (!file_exists($textpacks) || !is_dir($textpacks) || !is_readable($textpacks)) {
            return '';
        }

        if (($cwd = getcwd()) === false || !chdir($textpacks)) {
            return '';
        }

        $out = [];

        foreach ((array) glob('*.textpack', GLOB_NOSORT) as $file) {
            if (!is_file($file) || !is_readable($file)) {
                continue;
            }

            $file = file_get_contents($file);

            if (!preg_match('/^#@language|\n#@language\s/', $file)) {
                array_unshift($out, $file);
                continue;
            }

            $out[] =  $file;
        }

        chdir($cwd);
        return implode("\n", $out);
    }
571989
public function getSupportedPackages()
    {
        try {
            return $this->getSupportedAddonsLoader()->getAddonNames() ?: [];
        } catch (RuntimeException $exception) {
            echo $exception->getMessage() . PHP_EOL;
        }

        return null;
    }
769751
static function typeList()
    {
        $typeList =& $GLOBALS['eZPackageTypeList'];
        if ( !isset( $typeList ) )
        {
            $typeList = array();
            $ini = eZINI::instance( 'package.ini' );
            $types = $ini->variable( 'PackageSettings', 'TypeList' );
            foreach ( $types as $typeID => $typeName )
            {
                $typeList[] = array( 'name' => $typeName,
                                     'id' => $typeID );
            }
        }
        return $typeList;
    }
442656
protected function getPackagesData()
    {
        $composer = $this->event->getComposer();
        $locker = $composer->getLocker();
        if (isset($locker)) {
            $lockData = $locker->getLockData();
            $allPackages = isset($lockData['packages']) ? $lockData['packages'] : array();
        }

        $packages = array();
        // Only add those packages that we can reasonably
        // assume are components into our packages list
        foreach ($allPackages as $package) {
            if (isset($package['extra']['c33s-building-blocks']) && is_array($package['extra']['c33s-building-blocks'])) {
                $packages[] = $package;
            }
        }

        // Add the root package to the packages list.
        $root = $composer->getPackage();
        if ($root) {
            $dumper = new ArrayDumper();
            $package = $dumper->dump($root);

            if (isset($package['extra']['c33s-building-blocks']) && is_array($package['extra']['c33s-building-blocks'])) {
                $packages[] = $package;
            }
        }

        return $packages;
    }
1172349
protected function getCurrentPackageStates()
    {
        $savePackageStates = false;
        $loadedPackageStates = $this->loadPackageStates();
        if (
            empty($loadedPackageStates)
            || !isset($loadedPackageStates['version'])
            || $loadedPackageStates['version'] < self::PACKAGESTATE_FORMAT_VERSION
        ) {
            $loadedPackageStates = $this->scanAvailablePackages();
            $savePackageStates = true;
        }

        if ($savePackageStates) {
            $loadedPackageStates = $this->sortAndSavePackageStates($loadedPackageStates);
        }

        return $loadedPackageStates;
    }
1094883
protected function getPackages()
	{
		if ( ! is_null($package = $this->input->getArgument('package')))
		{
			return array($package);
		}
		elseif ( ! is_null($bench = $this->input->getOption('bench')))
		{
			return array($bench);
		}

		return $this->findAllAssetPackages();
	}
168335
public function getPackage()
    {
        $pkg = ($this->getTable()->getPackage() ? $this->getTable()->getPackage() : $this->getDatabase()->getPackage());
        if (!$pkg) {
            $pkg = $this->getBuildProperty('generator.targetPackage');
        }

        return $pkg;
    }
1272382
public function getPackageName(): string
	{
		if( $this->module_id > 0 )
		{
			$module = $this->getModule();
			if( strpos($this->class_name, "\\") === false )
			{
				$this->class_name = $module->getNamespace() . "Plugin\\" . $this->class_name;
			}
			return $module->getName();
		}
		else
		{
			return $this->name;
		}
	}
1102718
public static function get()
    {
        // Check for Laralum packages
        $packages = [];
        $location = __DIR__.'/../../';

        $files = is_dir($location) ? scandir($location) : [];

        foreach ($files as $package) {
            if ($package != '.' and $package != '..' and ucfirst($package) != 'Laralum') {
                array_push($packages, strtolower($package));
            }
        }

        return $packages;
    }
780519
public function getTwigExtras()
    {
        $list = array();
        foreach ($this->getManager()->getModules() as $module) {
            foreach ($module->getTwigExtras() as $extra) {
                $list[] = $extra;
            }
        }
        return $list;
    }
1235723
public function getTextSettings()
    {
        $options = $this->util->getTranslated()->getEmptyDropdownArray() +
                $this->util->getDbLookup()->getOrganizations();

        foreach (['gaf_filter_text1', 'gaf_filter_text2', 'gaf_filter_text3', 'gaf_filter_text4'] as $i => $field) {
            $output[$field] = [
                'label'        => $this->_('Organization') . ' ' . ($i + 1),
                'multiOptions' => $options,
                'required'     => false,
                ];
        }


        return $output;
    }
1266276
protected function packageTranslations()
    {
        return collect($this->app['translator']->getLoader()->namespaces())->flatMap(function ($path, $namespace) {
            return [
                ($namespace .= '::') => collect($this->getFiles($path))->flatMap(function ($file) use ($namespace) {
                    return [
                        ($translation = $file->getBasename('.php')) => trans($namespace . $translation),
                    ];
                }),
            ];
        })->filter(function ($translations) {
            return $translations->isNotEmpty();
        });
    }
396067
public function getPackagePath()
    {
        $packageHandle = $this->getPackageHandle();
        $result = $this->DIR_PACKAGES . '/' . $packageHandle;
        if (!is_dir($result)) {
            $result = $this->DIR_PACKAGES_CORE . '/' . $packageHandle;
        }

        return $result;
    }
1142681
public function getTextItems()
    {
        $parameters = func_get_args();
        //set parameter values
        if (count($parameters) > 0) {
            $worksheetName = $parameters[0];
        }
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . ((isset($parameters[0])) ? '/worksheets/' . $worksheetName . '/textItems' : '/textItems');
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');
        $json = json_decode($responseStream);
        return $json->TextItems->TextItemList;
    }
229736
public function getRequiredPackages()
    {
        $packages = [];

        $content = $this->getFileContents('composer.json');

        foreach (['require', 'require-dev'] as $key) {
            if (!isset($content[$key])) {
                continue;
            }

            foreach ($content[$key] as $name => $version) {
                if (!strstr($name, '/')) {
                    continue;
                }

                $packages[$name] = [
                    'name' => $name,
                    'version' => $version,
                    'devDependency' => $key === 'require-dev',
                ];
            }
        }

        if (empty($packages)) {
            throw new LogicException('We couldn\'t find any required packages.');
        }

        return $packages;
    }
383099
public function getPackageInfo()
    {
        $fileName = $this->getConfigParam('sShopDir') . "/pkg.info";
        $rev = @file_get_contents($fileName);
        $rev = str_replace("\n", "<br>", $rev);

        if (!$rev) {
            return false;
        }

        return $rev;
    }
800734
public function getPackages() {
        $response=CodeBank_ClientAPI::responseBase();
        
        //Ensure logged in
        if(!Permission::check('CODE_BANK_ACCESS')) {
            $response['status']='EROR';
            $response['message']=_t('CodeBankAPI.PERMISSION_DENINED', '_Permission Denied');
            
            return $response;
        }
        
        
        $response['data']=$this->overviewList(SnippetPackage::get());
        
        
        return $response;
    }