Проверка системных требований
@return array Массив сообщений - требований для установки
187424
static function systemRequirements()
    {
        $requirements = array();
        session_id('systemRequirements');
        @session_start();
		$_SESSION['check'] = 'check';
		@session_write_close();
		unset($_SESSION['check']);
		@session_start();
		if (empty($_SESSION['check']) || $_SESSION['check'] != 'check'){
			$requirements[] = 'Не работают пользовательские сессии в PHP';
		}
		@session_write_close();
        return $requirements;
    }
1000446
private function getParentModules(): array
    {
        if (! isset($this->capabilities['action'][Utils::getTypeParent()])) {
            return [];
        }

        $result = [];
        foreach ($this->capabilities['action'][Utils::getTypeParent()] as $capability) {
            if (in_array($capability->getName(), $this->capabilities['user'])) {
                $result = $capability->getParentModules();
            }
        }

        return $result;
    }
610808
public function postRegistration()
	{
		$data = Input::all();
		$errors = $this->getErrorFromRegData($data);

		if ($errors) {
			return $errors;
		}
		$newMerchant = new Merchant;
		$merchant = Merchants::NewMerchant($newMerchant, $data);

		if ($merchant) {
			$message = 'Вы успешно зарегистрировались.';

			return array('message' => $message);
		}
		$message = 'Ошибка, попробуйте ещё раз.';

		return array('message' => $message);

	}
785134
private function getBelongTo(): array
    {
        $result = [];

        if (! isset($this->capabilities['action'][Utils::getTypeBelongs()])) {
            return $result;
        }

        $table = TableRegistry::getTableLocator()->get('RolesCapabilities.Capabilities');
        Assert::isInstanceOf($table, CapabilitiesTable::class);

        $groups = $table->getUserGroups($this->user['id']);
        // check user capabilities against action's belongs capabilities
        foreach ($this->capabilities['action'][Utils::getTypeBelongs()] as $capability) {
            if (in_array($capability->getName(), $this->capabilities['user'])) {
                // if user has owner capability for current action add appropriate conditions to where clause
                $result[$this->table->aliasField($capability->getField()) . ' IN'] = array_keys($groups);
            }
        }

        return $result;
    }
401591
public function getForwardPathInfo()
    {
        return [
            [
                'fromMeta' => $this->scopeModel->getMeta(),
                'toMeta' => $this->relation->toModel->getMeta(),
                'targetFields' => $this->getForeignRelatedFields(),
                // field that joins the relationship
                'joinField' => $this,
                // is this path info for m2m relationship
                'm2m' => false,
                // true if we moving from owning to inverse side, false if moving from inverse to owning
                'direct' => true,
            ],
        ];
    }
935627
public function GetArray() {
      // $RoleData = $this->GetEditablePermissions();
      $RoleData = $this->Get();
      $RoleIDs = ConsolidateArrayValuesByKey($RoleData->ResultArray(), 'RoleID');
      $RoleNames = ConsolidateArrayValuesByKey($RoleData->ResultArray(), 'Name');
      return ArrayCombine($RoleIDs, $RoleNames);
   }
211488
public function getCustomers()
    {
        $aCustomersConf = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopConfVar("aRDFaCustomers");
        if (isset($aCustomersConf)) {
            foreach ($this->_aCustomers as $sCustomer => $iValue) {
                $aCustomers[$sCustomer] = (in_array($sCustomer, $aCustomersConf)) ? 1 : 0;
            }
        } else {
            $aCustomers = [];
        }

        return $aCustomers;
    }
1202961
public function getModules()
    {
        if (!$this->_modules) {
        
            $translator = $this->application->getTranslator();
            $this->_modules = [
                'structure' => [
                	  'position'  => MENU_SITE,
                      'name' 	  => $translator->_('Структура и материалы'),
					  'iconCls'   => 'tree-folder-visible',
                      'class'     => 'Cetera.panel.Structure'
                ],			
                'materials' => [
                	  'position'  => MENU_SITE,
                      'name' 	  => $translator->_('Материалы'),
                	  'icon'      => 'images/math2.gif',
					  'iconCls'   => 'x-fa fa-file-text',
                      'class'     => 'Cetera.panel.MaterialsByCatalog'
                ]
            ];          
            
            if ($this->application->getUser() && $this->application->getUser()->allowAdmin()) {
        
                $this->_modules['widgets'] = array(
                	  'position' => MENU_SITE,
                      'name' 	 => $translator->_('Шаблоны виджетов'),
                	  'icon'     => 'images/widget_icon.png',
					  'iconCls'  => 'x-fa fa-file-code-o',
                	  'class'    => 'Cetera.widget.templates.Panel',
					  'ext6_compat'=> true
                );
		
                $this->_modules['widget_areas'] = array(
                	  'position' => MENU_SITE,
                      'name' 	 => $translator->_('Области'),
                	  'icon'     => 'images/widget_icon.png',
					  'iconCls'  => 'x-fa fa-cog',
                	  'class'    => 'Cetera.widget.Panel'
                ); 
                
                $this->_modules['menus'] = array(
                	  'position' => MENU_SITE,
                      'name' 	   => $translator->_('Меню'),
                	  'icon'     => 'images/icon_menu.png',
					  'iconCls'  => 'x-fa fa-bars',
                	  'class'    => 'Cetera.panel.Menu'
                );   

                $this->_modules['setup'] = array(
                			'position' => MENU_SERVICE,
                            'name' 	   => $translator->_('Настройки'),
                			'icon'     => 'images/setup_small.gif',
							'iconCls'  => 'x-fa fa-cogs',
                			'class'    => 'Cetera.panel.Setup'
                );				
            
                $this->_modules['types'] = array(
                			'position' => MENU_SERVICE,
                            'name' 	   => $translator->_('Типы материалов'),
                			'icon'     => 'images/setup_small.gif',
							'iconCls'  => 'x-fa fa-cogs',
                			'class'    => 'Cetera.panel.MaterialTypes'
                );
                
                $this->_modules['users'] = array(
                			'position' => MENU_SERVICE,
                            'name' 	   => $translator->_('Пользователи'),
                			'icon'     => 'images/user.gif',
							'iconCls'  => 'x-fa fa-user',
                			'class'    => 'Cetera.users.MainPanel'
                );
                
                $this->_modules['groups'] = array(
                	  'position' => MENU_SERVICE,
                      'name' 	   => $translator->_('Группы пользователей'),
                      'url'      => 'include/ui_groups.php',
                	  'icon'     => 'images/users.gif',
					  'iconCls'  => 'x-fa fa-users',
                	  'class'    => 'GroupsPanel'
                );
                
                $this->_modules['eventlog'] = array(
					'position' => MENU_SERVICE,
					'name' 	   => $translator->_('Журнал'),
					'icon'     => 'images/audit1.gif',
					'class'    => 'EventlogPanel',
					'iconCls'  => 'x-fa fa-file-text-o',
					'class'    => 'Cetera.eventlog.Panel',
                ); 
                
                $this->_modules['dbrepair'] = array(
					'position' => MENU_SERVICE,
					'name' 	   => $translator->_('Проверка и ремонт БД'),
					'icon'     => 'images/icon_repair.gif',
					'iconCls'  => 'x-fa fa-medkit',
					'class'    => 'Cetera.panel.Repair',
					'ext6_compat'=> true
                );
				
                $this->_modules['mail_templates'] = array(
					'position' => MENU_SERVICE,
					'name' 	   => $translator->_('Почтовые шаблоны'),
					'icon'     => 'images/mail.gif',
					'iconCls'  => 'x-fa fa-envelope',
					'class'    => 'Cetera.grid.MailTemplates',
                );				
                
                $this->_modules['plugins'] = array(
					'position' => MENU_SERVICE,
					'name' 	   => $translator->_('Плагины'),
					'icon'     => 'images/plugin.png',
					'class'    => 'Cetera.plugin.List',
					'iconCls'  => 'x-fa fa-plug'
                );
                
                $this->_modules['themes'] = array(
					'position' => MENU_SERVICE,
					'name' 	   => $translator->_('Темы'),
					'icon'     => 'images/16X16/gallery.gif',
					'iconCls'  => 'x-fa fa-picture-o',
					'class'    => 'Cetera.theme.List',
                );                
                 
            }           
        
        }
        
        return $this->_modules + $this->_user_modules;
    }
640399
public function getUiLangsList() {
		$result = [];
		$UIlangs = $this->_modelConfigSettingsApp->getUiLangs();
		if (empty($UIlangs)) {
			return $result;
		}

		$language = new Language();
		foreach ($UIlangs as $country => $UIlang) {
			$langName = $language->convertLangCode($UIlang, 'native');
			if (empty($langName)) {
				continue;
			}

			$result[$country] = mb_ucfirst($langName);
		}

		return $result;
	}
1232794
protected function getFormList()
    {
        $formList = [];
        foreach ($this->availableAuthenticators as $key => $className) {
            /** @var BootstrapMFAAuthenticator $class */
            $class = Injector::inst()->get($className);
            $formList[] = $class->getMFAForm($this, static::VERIFICATION_METHOD);
        }

        return $formList;
    }
662794
public function getSortOptions()
    {
        $options = [];
        $descriptorSort = [];
        $modelDescriptorFields = $this->descriptorField;
        if (!is_array($modelDescriptorFields)) {
            $modelDescriptorFields = [$modelDescriptorFields];
        }
        foreach ($modelDescriptorFields as $field) {
            if ($this->hasAttribute($field)) {
                $descriptorSort[$field] = SORT_ASC;
            }
        }
        if (!empty($descriptorSort)) {
            $options[$this->descriptorLabel] = $descriptorSort;
        }
        if (empty($options) && $this->hasAttribute('created')) {
            $options['Created'] = ['created' => SORT_ASC];
        }

        return $options;
    }
512494
public function getNewStructure()
    {
        return [
            [
                "type"            => "singleLine",
                "fieldID"         => $this->prefix . "title",
                "tabID"           => trans("Translations"),
                "label"           => trans("HCGalleries::galleries.title"),
                "required"        => 1,
                "requiredVisible" => 1,
                "multiLanguage"   => 1,
            ],
            [
                "type"          => "richTextArea",
                "fieldID"       => $this->prefix . "content",
                "tabID"         => trans("Translations"),
                "label"         => trans("HCGalleries::galleries.content"),
                "multiLanguage" => 1,
            ],
            [
                "type"          => "singleLine",
                "fieldID"       => $this->prefix . "location",
                "tabID"         => trans("General"),
                "label"         => trans("HCGalleries::galleries.location"),
                "multiLanguage" => 1,
            ],
            [
                "type"            => "dateTimePicker",
                "properties"      => [
                    "format" => "YYYY-MM-DD HH:mm:ss",
                ],
                "fieldID"         => $this->prefix . "publish_at",
                "tabID"           => trans("General"),
                "label"           => trans("HCGalleries::galleries.publish_at"),
                "requiredVisible" => 1,
            ], [
                "type"       => "dateTimePicker",
                "properties" => [
                    "format" => "YYYY-MM-DD HH:mm:ss",
                ],
                "fieldID"    => $this->prefix . "expires_at",
                "tabID"      => trans("General"),
                "label"      => trans("HCGalleries::galleries.expires_at"),


            ],
            [
                "type"      => "resource",
                "fieldID"   => $this->prefix . "images",
                "tabID"     => trans("Resources"),
                "uploadURL" => route("admin.api.resources"),
                "viewURL"   => route("resource.get", ['/']),
                "sortable"  => 1,
            ],
        ];
    }
976589
public function getMiddleware() : array
    {
        if (!$this->providesMiddleware()) {
            return [];
        }

        $allControllerMiddleware = array_filter(
            $this->getController()->getControllerMiddleware(),
            function (ControllerMiddleware $middleware) {
                return !$middleware->excludedForMethod($this->controllerMethod);
            }
        );

        return array_map(
            function ($controllerMiddleware) {
                return $controllerMiddleware->middleware();
            },
            $allControllerMiddleware
        );
    }
1267927
public function getList() {
        $context=$this->getSearchContext();
        $params=$this->getRequest()->requestVar('q');
        
        if(is_array($params)) {
            if(array_key_exists('Created', $params) && is_array($params['Created'])) {
                $params['Created']=implode(' ', $params['Created']);
            }
            
            $params=array_map('trim', $params);
        }
        
        $list=$context->getResults($params);
        
        $this->extend('updateList', $list);
        
        return $list;
    }
1362302
public function GetList() {
        $namespacePrefix = "\\Applications\\" .
                "APP_NAME" .
                "\\Resources\\Controller\\";
        $resourceNamespace = $this->GetResourceNamespace($namespacePrefix, $this->ModuleValue);
        $resourceFile = new $resourceNamespace();
        return $resourceFile->GetList();
    }
1321243
public function toArray()
    {
        return [
            'id' => $this->getId(),
            'key' => $this->getKey(),
            'name' => $this->getName(),
            'meta' => $this->getMeta(),
            'keywords' => $this->getKeywords(),
            'defaultLocale' => $this->getDefaultLocale(),
            'creator' => $this->getCreator(),
            'changer' => $this->getChanger(),
            'created' => $this->getCreated(),
            'changed' => $this->getChanged(),
        ];
    }
1325235
public function getPlugins()
    {
        if ($this->noRequire) {
            return [];
        }
        $res = [
            'hiqdev/hidev-php' => 'dev-master',
        ];
        if ($this->vendorRequire) {
            $res[$this->vendorRequire] = 'dev-master';
        }

        return $res;
    }