Pobranie modułów aplikacyjnych ze wszystkich vendorów
@return array
772775
public static function getVendorModules()
    {
        $modules = [];
        //iteracja po vendorach
        foreach (self::getVendors() as $vendor) {
            //iteracja po modułach
            foreach (new \DirectoryIterator($vendor) as $module) {
                if (!$module->isDir() || $module->isDot() || !self::_moduleValid($module->getPathname())) {
                    continue;
                }
                $modules[] = $module->getPathname();
            }
        }
        return $modules;
    }
14038
public function getModules(){
		$modules=array();
		$db=BFactory::getDBO();
		if(empty($db)){
			return $modules; //False?
			}
		$qr='SELECT * from `soft_modules_rules` where pageid='.$this->id;
		$q=$db->Query($qr);
		if(empty($q)){
			return $modules; //False?
			}
		while($l=$db->fetch($q)){
			$id=(int)$l['id'];
			$modules[$id]=new BSoftModule();
			$modules[$id]->group=$this;
			$modules[$id]->load($l);
			}
		return $modules;
		}
976089
public function getSortedModuleList() : array {
		$moduleList = $this->modules;

		foreach ($moduleList as $moduleSpec) {
			$moduleClass = $moduleSpec['class'];
			$module      = $moduleSpec['object'];

			if ($module instanceof OrderAwareModule) {
				//All modules that should be loaded after this one
				foreach ($module->getModulesAfter() as $afterModuleClass) {
					if (\array_key_exists($afterModuleClass, $moduleList)) {
						$moduleList[$moduleClass]['after'][] = $afterModuleClass;
						$moduleList[$afterModuleClass]['before'][] = $moduleClass;
					}
				}
				//All modules that should be loaded before this one
				foreach ($module->getModulesBefore() as $afterModuleClass) {
					if (\array_key_exists($afterModuleClass, $moduleList)) {
						$moduleList[$moduleClass]['before'][] = $afterModuleClass;
						$moduleList[$afterModuleClass]['after'][] = $moduleClass;
					}
				}
			}
		}

		$sortedList = [];
		$noIncomingNodes = [];
		foreach ($moduleList as $moduleSpec) {
			$moduleSpec['after']  = \array_unique($moduleSpec['after']);
			$moduleSpec['before'] = \array_unique($moduleSpec['before']);
			if (empty($moduleSpec['before'])) {
				$noIncomingNodes[$moduleSpec['class']] = $moduleSpec;
			}
		}

		//Do the topological sorting (Kahn's algorithm)
		while (!empty($noIncomingNodes)) {
			$moduleSpec = array_shift($noIncomingNodes);
			\array_push($sortedList, $moduleSpec);
			unset($moduleList[$moduleSpec['class']]);

			foreach ($moduleSpec['after'] as $nextModuleKey => $nextModuleClass) {
				unset($moduleList[$nextModuleClass]['before'][
					\array_search($moduleSpec['class'], $moduleList[$nextModuleClass]['before'])
				]);
				if (empty($moduleList[$nextModuleClass]['before'])) {
					$noIncomingNodes[] = $moduleList[$nextModuleClass];
				}
				unset($moduleSpec['after'][$nextModuleKey]);
			}
		}

		foreach ($moduleList as $key => $remainingModuleSpec) {
			if (empty($remainingModuleSpec['before'])) {
				$sortedList[] = $moduleList[$remainingModuleSpec['class']];
				unset($moduleList[$key]);
			}
		}

		if (!empty($moduleList)) {
			throw new CircularModuleLoadOrderDetectedException($this->getDotGraph());
		} else {
			$result = [];
			foreach ($sortedList as $moduleSpec) {
				$result[] = $moduleSpec['object'];
			}
			return $result;
		}
	}
317156
public function getActiveThemesList()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        $activeThemeList = [];
        if (!$this->isAdmin()) {
            $activeThemeList[] = $config->getConfigParam('sTheme');

            if ($customThemeId = $config->getConfigParam('sCustomTheme')) {
                $activeThemeList[] = $customThemeId;
            }
        }

        return $activeThemeList;
    }
755861
public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();

        $paymentServiceProviders = $em->getRepository('EcommerceBundle:PaymentServiceProvider')->findAll();

        return array(
            'paymentServiceProviders' => $paymentServiceProviders,
        );
    }
1096829
public function getAccessSets()
    {

        $default = array();

        $guest = array(
            self::VIEW
        );

        $user = array_merge($guest,
            array(
                self::CREATE_POST,
                self::CREATE_TOPIC
            )
        );
        
        $userFull = array_merge($user,
            array(
                self::UPLOAD_FILE
            )
        );

        $mod = array_merge($userFull,
            array(
                self::EDIT_POST,
                self::EDIT_TOPIC,
                self::DELETE_POST,
                self::DELETE_TOPIC,
                self::MOVE_POST,
                self::MOVE_TOPIC,
                self::SPLIT_TOPIC,
            )
        );

        return array(
            // no access
            "default_1" => $default,
            // readonly
            "default_2" => $guest,
            // normal
            "default_3" => $user,
            // full (add extension access)
            "default_4" => $userFull,
            // moderator
            "default_5" => $mod
        );
    }
666769
public function getModules()
    {
        $arrModules = [];
        $objModules = $this->Database->execute("SELECT m.id, m.name, t.name AS theme FROM tl_module m LEFT JOIN tl_theme t ON m.pid=t.id ORDER BY t.name, m.name");

        while ($objModules->next())
        {
            $arrModules[$objModules->theme][$objModules->id] = $objModules->name . ' (ID ' . $objModules->id . ')';
        }

        return $arrModules;
    }
144624
public function getExportModes()
    {
        return array(
            'listAuthor' =>         ExportableField::LIST_OF
                                    + ExportableField::AUTHOR,
            'listAuthorObject' =>   ExportableField::LIST_OF
                                    + ExportableField::AUTHOR
                                    + ExportableField::OBJECT,
            'listAuthorToValue' =>  ExportableField::LIST_OF
                                    + ExportableField::AUTHOR
                                    + ExportableField::VALUE,
            'listValue' =>          ExportableField::LIST_OF
                                    + ExportableField::VALUE,
            'getPostdata' =>        ExportableField::POSTDATA
        );
    }
1119098
protected function getPaymentTransactionStructure()
    {
        return [
            'usage'        => $this->usage,
            'remote_ip'    => $this->remote_ip,
            'amount'       => $this->transformAmount($this->amount, $this->currency),
            'currency'     => $this->currency,
            'reference_id' => $this->reference_id
        ];
    }
979149
protected function getPaymentTransactionStructure()
    {
        return [
            'gaming'                    => $this->gaming,
            'moto'                      => $this->moto,
            'notification_url'          => $this->notification_url,
            'return_success_url'        => $this->return_success_url,
            'return_failure_url'        => $this->return_failure_url,
            'amount'                    => $this->transformAmount($this->amount, $this->currency),
            'currency'                  => $this->currency,
            'card_holder'               => $this->card_holder,
            'card_number'               => $this->card_number,
            'cvv'                       => $this->cvv,
            'expiration_month'          => $this->expiration_month,
            'expiration_year'           => $this->expiration_year,
            'customer_email'            => $this->customer_email,
            'customer_phone'            => $this->customer_phone,
            'document_id'               => $this->document_id,
            'birth_date'                => $this->birth_date,
            'billing_address'           => $this->getBillingAddressParamsStructure(),
            'shipping_address'          => $this->getShippingAddressParamsStructure(),
            'mpi_params'                => $this->getMpiParamsStructure(),
            'risk_params'               => $this->getRiskParamsStructure(),
            'dynamic_descriptor_params' => $this->getDynamicDescriptorParamsStructure()
        ];
    }
819646
protected function _getOxcomAdminSearchModules()
    {
        $aData = [];
        $oModules = oxNew(\OxidEsales\Eshop\Core\Module\ModuleList::class);
        $aModules = $oModules->getModulePaths();
        foreach ($aModules as $sKey => $sValue) {
            $oModule = oxNew(\OxidEsales\Eshop\Core\Module\Module::class);
            $oModule->load($sKey);
            $sTitle = strip_tags($oModule->getTitle());
            if (strstr(strtolower($sTitle), strtolower($this->_sQueryName))) {
                $aData[] = ['name' => $sTitle . ' (' . ($oModule->isActive() ? Registry::getLang()->translateString("OXCOM_ADMINSEARCH_MODULE_ACTIVE") : Registry::getLang()->translateString("OXCOM_ADMINSEARCH_MODULE_INACTIVE")) . ')', 'oxid' => $sKey, 'type' => 'module'];
            }
        }

        return $aData;
    }
1122217
public function getAllModules()
	{
		$arrModules = array();

		$strQuery = 'SELECT m.id, m.name, t.name AS theme FROM tl_module m LEFT JOIN tl_theme t ON m.pid=t.id';

		if(\Input::get('table') == 'tl_module' && \Input::get('act') == 'edit')
		{
			$strQuery .= ' WHERE m.id != ?';
		}

		$strQuery .= ' ORDER BY t.name, m.name';

		$objModules = $this->Database->prepare($strQuery)->execute(\Input::get('id'));

		while ($objModules->next())
		{
			$arrModules[$objModules->theme][$objModules->id] = $objModules->name . ' (ID ' . $objModules->id . ')';
		}

		return $arrModules;
	}
1224139
public function toOptionArray() {
        return [
            [
                'value' => self::MODE_CARDS,
                'label' => __('Cards')
            ],
            [
                'value' => self::MODE_MIXED,
                'label' => __('Mixed')
            ],
            [
                'value' => self::MODE_LOCAL,
                'label' => __('Local payments')
            ] 
        ];
    }
1238313
protected function getProductsWishlist()
    {
        $list = $this->getWishlist();

        if (empty($list)) {
            return array();
        }

        $ids = array();

        foreach ((array) $list as $result) {
            $ids[] = $result['product_id'];
        }

        $conditions = array('product_id' => $ids);

        $options = array(
            'buttons' => array(
                'cart_add', 'wishlist_remove', 'compare_add')
        );

        return $this->getProducts($conditions, $options);
    }
559152
public function getModuleNames()
    {
        $data = [];
        foreach (Yii::$app->getFrontendModules() as $k => $f) {
            $data[] = ['value' => $k, 'label' => $k];
        }
        return $data;
    }
275561
public function getAdminModules()
    {
        $modules = [];
        
        foreach ($this->getModules() as $id => $obj) {
            if ($obj instanceof Module && $obj instanceof AdminModuleInterface) {
                $modules[$id] = $obj;
            }
        }
        
        return $modules;
    }
319320
public function getAllModules()
    {
        $modules = array_map(function ($value) {
            return $this->loadModule($value);
        }, $this->registry->getMap());

        return array_filter($modules, function ($module) {
            return !is_null($module);
        });
    }