Checks the access filter setup and adds it to the report.

@param SolrAdminService $solrAdminService
@return string
194757
protected function checkAccessFilter(SolrAdminService $solrAdminService)
    {
        try {
            $accessFilterPluginStatus = GeneralUtility::makeInstance(AccessFilterPluginInstalledStatus::class);
            $accessFilterPluginVersion = $accessFilterPluginStatus->getInstalledPluginVersion($solrAdminService);
            $accessFilterMessage = $accessFilterPluginVersion;
        } catch (\Exception $e) {
            $this->responseStatus = Status::ERROR;
            $accessFilterMessage = 'Error getting access filter: ' . $e->getMessage();
        }
        return $accessFilterMessage;
    }
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
        );
    }
89814
public function getFiltersArray()
    {
        if ($this->_filtersArray === null) {
            $this->_filtersArray = $this->getQueryCacheHelper((new Query())->from('{{%admin_storage_filter}}')->select(['id', 'identifier', 'name'])->indexBy('identifier')->orderBy(['name' => SORT_ASC]), self::CACHE_KEY_FILTER);
        }

        return $this->_filtersArray;
    }
598751
public function getStatus()
    {
        $reports = [];
        $solrConnections = GeneralUtility::makeInstance(ConnectionManager::class)->getAllConnections();

        foreach ($solrConnections as $solrConnection) {
            $coreAdmin = $solrConnection->getAdminService();
            /** @var $solrConnection SolrConnection */
            if (!$coreAdmin->ping()) {
                $url = $coreAdmin->__toString();
                $pingFailedMsg = 'Could not ping solr server, can not check version ' . (string)$url;
                $status = GeneralUtility::makeInstance(
                    Status::class,
                    /** @scrutinizer ignore-type */ 'Apache Solr Version',
                    /** @scrutinizer ignore-type */ 'Not accessible',
                    /** @scrutinizer ignore-type */ $pingFailedMsg,
                    /** @scrutinizer ignore-type */ Status::ERROR
                );
                $reports[] = $status;
                continue;
            }

            $solrVersion = $coreAdmin->getSolrServerVersion();
            $isOutdatedVersion = version_compare($this->getCleanSolrVersion($solrVersion), self::REQUIRED_SOLR_VERSION, '<');

            if (!$isOutdatedVersion) {
                continue;
            }

            $formattedVersion = $this->formatSolrVersion($solrVersion);
            $variables = ['requiredVersion' => self::REQUIRED_SOLR_VERSION, 'currentVersion' => $formattedVersion, 'solr' => $coreAdmin];
            $report = $this->getRenderedReport('SolrVersionStatus.html', $variables);
            $status = GeneralUtility::makeInstance(
                Status::class,
                /** @scrutinizer ignore-type */ 'Apache Solr Version',
                /** @scrutinizer ignore-type */ 'Outdated, Unsupported',
                /** @scrutinizer ignore-type */ $report,
                /** @scrutinizer ignore-type */ Status::ERROR
            );

            $reports[] = $status;
        }

        return $reports;
    }
900445
public function getFromFilterId( $filterId) {
        $service = sprintf( self::API_PARENTAL_FILTER_PLANNING, $filterId);
        $rest = $this->getService( $service);
        $rest->GET();

        return $rest->getResult( models\ParentalControl\FilterPlanning::class);
    }
809461
public function getFilter()
    {
        if (false === $this->filter) {
            return '';
        }
        if (is_array($this->filter)) {
            return Form::get()->select($this->dataProvider->filtersKey . '[' . $this->name . ']', $this->filter, null, array(), '');
        }
        
        if (is_string($this->filter) && (strlen($this->filter) > 10)){
            return $this->filter;
        }
        
        return Form::get()->input($this->dataProvider->filtersKey . '[' . $this->name . ']');
    }
1274652
public function validate( $variableSet, $nsMgr )
	{
		$arcs = $variableSet->xbrlTaxonomy->getGenericArc( \XBRL_Constants::$arcRoleBooleanFilter, $this->linkRoleUri, $this->label, $this->path );

		/**
		 * @var array[Filter] $filters
		 */
		$filters = array();

		foreach ( $arcs as $arc )
		{
			// BMS 2019-02-11
			if ( $this->path != $arc['frompath'] ) continue;

			$variableSet->xbrlTaxonomy->getGenericResource( 'filter', null, function( $roleUri, $linkbase, $variableSetName, $index, $resource ) use( &$filters, $arc )
			{
				// if ( $resource['label'] != $arc['to'] ) return true;
				if ( $resource['path'] != $arc['topath'] /* || $linkbase != $arc['linkbase'] */ ) return true;

				if ( $arc['attributes'] )
				{
					foreach ( $arc['attributes'] as $name => $attribute )
					{
						$value = $attribute['type'] == "xs:boolean"
							? (bool)$attribute['value']
							: $attribute['value'];
						$resource[ $name ] = $value;
					}
				}

				$filterResources[] = $resource;
				$className = __NAMESPACE__ . '\\' . ucfirst( $resource['filterType'] );
				$filters[] = $className::fromArray( $resource );

				return true;
			}, $arc['toRoleUri'], $arc['to'], $arc['tolinkbase'] );
		}

		foreach ( $filters as $filter )
		{
			if ( ! $filter->validate( $variableSet, $nsMgr ) )
			{
				return false;
			}
		}

		$this->filters = $filters;

		return true;
	}
458825
protected function checkPingTime(SolrAdminService $solrAdminService)
    {
        try {
            $pingQueryTime = $solrAdminService->getPingRoundTripRuntime();
            $pingMessage = (int)$pingQueryTime . ' ms';
        } catch (PingFailedException $e) {
            $this->responseStatus = Status::ERROR;
            $pingMessage = 'Ping error: ' . $e->getMessage();
        }
        return $pingMessage;
    }
835296
public function getStatus()
    {
        $reports = [];
        $solrConnections = GeneralUtility::makeInstance(ConnectionManager::class)->getAllConnections();

        foreach ($solrConnections as $solrConnection) {
            $adminService = $solrConnection->getAdminService();

            if ($adminService->ping() && $adminService->getSolrconfigName() != self::RECOMMENDED_SOLRCONFIG_VERSION) {
                $variables = ['solr' => $adminService, 'recommendedVersion' => self::RECOMMENDED_SOLRCONFIG_VERSION];
                $report = $this->getRenderedReport('SolrConfigStatus.html', $variables);
                $status = GeneralUtility::makeInstance(
                    Status::class,
                    /** @scrutinizer ignore-type */ 'Solrconfig Version',
                    /** @scrutinizer ignore-type */ 'Unsupported solrconfig.xml',
                    /** @scrutinizer ignore-type */ $report,
                    /** @scrutinizer ignore-type */ Status::WARNING
                );

                $reports[] = $status;
            }
        }

        return $reports;
    }
643528
public function getInputFilter($inputFilter = null)
    {
        $inputFilter        = $inputFilter ?? $this->inputFilter ?? $this->serviceAlias;
        $sl                 = $this->getServiceLocator();
        $inputFilterManager = $sl->get('InputFilterManager');
        $inputFilter        = $inputFilterManager->get($inputFilter);

        return $inputFilter;
    }
1036774
private function scanRolesAndPermissions()
    {
        $files = $this->getConfigFiles();

        if( ! empty($files) )
            foreach ( $files as $filePath ) {
                $config = json_decode(file_get_contents($filePath), true);

                if( is_null($config) )
                    $this->info('Invalid json file: ' . $filePath);
                else {
                    $packageName = array_get($config, 'general.serviceProviderNameSpace');

                    if( is_null($packageName) || $packageName == '' ) {
                        $this->error('SKIPPING! Package must have a name! file: ' . $filePath);
                        continue;
                    }

                    if( array_key_exists('acl', $config) ) {
                        $this->aclData[] = [
                            'packageName' => $packageName,
                            'acl'         => array_get($config, 'acl'),
                        ];
                    }
                }
            }
    }
852618
private function addServices()
    {
        $publicServices = $privateServices = '';
        $definitions = $this->container->getDefinitions();
        ksort($definitions);
        foreach ($definitions as $id => $definition) {
            if ($definition->isPublic()) {
                $publicServices .= $this->addService($id, $definition);
            } else {
                $privateServices .= $this->addService($id, $definition);
            }
        }

        return $publicServices.$privateServices;
    }
388250
private function getFilterMethod($transform): string
    {
        /** @var ConfigModel $settings */
        $config = ImagerService::getConfig();

        return ImagerService::$imageDriver === 'imagick' ? ImagerService::$filterKeyTranslate[(string)$config->getSetting('resizeFilter', $transform)] : ImageInterface::FILTER_UNDEFINED;
    }
621902
public function solr_client() {
        if (!isset($this->_solrclient)) {
            $this->_solrclient = new \Solarium\Client(array(
                'endpoint' => array(
                    'localhost' => array(
                        'host' => $this->_url,
                        'port' => $this->_solr_port,
                        'path' => '/solr/' . $this->_collection . '/'
                    )
                )
            ));
        }

        return $this->_solrclient;
    }
417688
private function setupFilter($params)
    {
        $filter = array(
            'URLSegment' => Convert::raw2sql($params['ID']),
            'Live'       => 1,
        );
        if (Member::currentUserID() !== 0 && !Permission::checkMember(Member::currentUserID(), array('VIEW_NEWS', 'CMS_ACCESS_NewsAdmin'))) {
            $filter['Live'] = 0;
        }

        return $filter;
    }
1225695
public function getStatus()
    {
        $reports = [];

        $validUrl = 'http://www.typo3-solr.com';
        if (!filter_var($validUrl, FILTER_VALIDATE_URL)) {
            $message = 'You are using a PHP version that is affected by a bug in
				function filter_var(). This bug causes said function to
				incorrectly report valid URLs as invalid if they contain a
				dash (-). EXT:solr uses this function to validate URLs when
				indexing TYPO3 pages. Please check with your administrator
				whether a newer version can be installed.
				More information is available at
				<a href="https://bugs.php.net/bug.php?id=51192">php.net</a>.';

            $reports[] = GeneralUtility::makeInstance(Status::class,
                'PHP filter_var() bug',
                'Affected PHP version detected.',
                $message,
                Status::ERROR
            );
        }

        return $reports;
    }
1211816
protected function _getUserViewId($blReset = false)
    {
        if ($this->_sUserViewId != null && !$blReset) {
            return $this->_sUserViewId;
        }

        // loading R&R data from session
        $userSessionGroups = $this->getCurrentUserSessionGroups();
        $this->_sUserViewId = md5(\OxidEsales\Eshop\Core\Registry::getConfig()->getShopID() . \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageTag() . serialize($userSessionGroups) . (int) $this->isAdmin());

        return $this->_sUserViewId;
    }