Loads the previously saved filter settings from a persistent storage

@see self::save_filter()
@param stdclass $persistant storage object
@return stdclass filter data
967624
public static function load_filter(stdclass $persistant) {
        $data = new stdclass();
        if (isset($persistant->tool_customlang_filter)) {
            foreach ($persistant->tool_customlang_filter as $key => $value) {
                $data->{$key} = unserialize($value);
            }
        }
        return $data;
    }
128377
private function loadDocumentTree($config, ContainerBuilder $container)
    {
        $configuration = [
            'routing_defaults' => $config['routing_defaults'],
            'repository_name' => $config['repository_name'],
            'sortable_by' => $config['sortable_by'],
            'move' => true,
            'reorder' => true,
        ];

        $container->setParameter('sonata_admin_doctrine_phpcr.tree_block.configuration', $configuration);

        foreach ($configuration as $key => $value) {
            $container->setParameter('sonata_admin_doctrine_phpcr.tree_block.'.$key, $value);
        }
    }
16207
public function loadCollection(PersistentCollectionInterface $collection) : void
    {
        $mapping = $collection->getMapping();
        switch ($mapping['association']) {
            case ClassMetadata::EMBED_MANY:
                $this->loadEmbedManyCollection($collection);
                break;

            case ClassMetadata::REFERENCE_MANY:
                if (isset($mapping['repositoryMethod']) && $mapping['repositoryMethod']) {
                    $this->loadReferenceManyWithRepositoryMethod($collection);
                } else {
                    if ($mapping['isOwningSide']) {
                        $this->loadReferenceManyCollectionOwningSide($collection);
                    } else {
                        $this->loadReferenceManyCollectionInverseSide($collection);
                    }
                }
                break;
        }
    }
89177
public function get( $key, $default = null, $save = false )
	{
		$this->checkLoaded();

		return SettingsUtilities::get($this->storage, $key, $default);
	}
604725
public function save($data)
    {
        if (is_array($data)) {
            foreach ($data as $entity) {
                $this
                    ->manager
                    ->persist($entity);
            }
        } else {
            $this
                ->manager
                ->persist($data);
        }

        $this
            ->manager
            ->flush($data);

        return $data;
    }
1347327
private function loadReferenceManyCollectionInverseSide(PersistentCollectionInterface $collection)
    {
        $query     = $this->createReferenceInverseSideQuery($collection->getMapping(), $collection->getOwner());
        $documents = $query->execute()->toArray();

        foreach ($documents as $key => $document) {
            $collection->add($document);
        }
    }
1033931
public static function load()
    {
        if (!extension_loaded('opencensus')) {
            trigger_error('opencensus extension required to load Doctrine integrations.', E_USER_WARNING);
            return;
        }

        PDO::load();

        $persisterClass = (Version::compare('2.5.0') < 0)
            ? 'Doctrine\ORM\Persisters\Entity\BasicEntityPersister'    // Doctrine 2.5 or greater
            : 'Doctrine\ORM\Persisters\BasicEntityPersister';          // Doctrine 2.4 or earlier

        // public function load(array $criteria, $entity = null, $assoc = null, array $hints = array(),
        //      $lockMode = null, $limit = null, array $orderBy = null)
        opencensus_trace_method($persisterClass, 'load', function ($bep) {
            return [
                'name' => 'doctrine/load',
                'attributes' => ['entity' => $bep->getClassMetadata()->name],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // public function loadAll(array $criteria = array(), array $orderBy = null, $limit = null, $offset = null)
        opencensus_trace_method($persisterClass, 'loadAll', function ($bep) {
            return [
                'name' => 'doctrine/loadAll',
                'attributes' => ['entity' => $bep->getClassMetadata()->name],
                'kind' => Span::KIND_CLIENT
            ];
        });

        // public int PDOConnection::exec(string $query)
        opencensus_trace_method(PDOConnection::class, 'exec', function ($scope, $query) {
            return [
                'name' => 'doctrine/exec',
                'attributes' => ['query' => $query],
                'kind' => Span::KIND_CLIENT
            ];
        });
    }
692957
public static function save_filter_values_from_form(tour $tour, \stdClass $data) {
        $filtername = static::get_filter_name();

        $key = "filter_{$filtername}";

        $newvalue = $data->$key;
        foreach ($data->$key as $value) {
            if ($value === static::ANYVALUE) {
                $newvalue = [];
                break;
            }
        }

        $tour->set_filter_values($filtername, $newvalue);
    }
35308
private function persistWurflInfo($wurflInfoIterator)
    {
        foreach ($wurflInfoIterator as $info) {
            $this->persistenceProvider->save(WURFL_Xml_Info::PERSISTENCE_KEY, $info);
            return;
        }
    }
233025
private function loadFilterValues()
    {
        $session = new Session();
        $this->filterValues = $session->get($this->getStorageNamespace());
        // Because entities saved into the session are not currently managed,
        // we retrieve the reference id previously set by the storeFilterValues function
        // to load the expected entity
        foreach($this->filters as $datagridFilter) {
            if ($datagridFilter->getType() instanceof DatagridFilterTypeEntity) {
                if (!empty($this->filterValues[$datagridFilter->getName()])) {
                    $filterOptions = $datagridFilter->getOptions();
                    $this->filterValues[$datagridFilter->getName()] = $this->entityManager->getReference(
                        $filterOptions['class'],
                        $this->filterValues[$datagridFilter->getName()]
                    );
                }
            }
        }
    }
793182
public function loadCollection(PersistentCollectionInterface $collection)
    {
        $mapping = $collection->getMapping();
        switch ($mapping->association) {
            case PropertyMetadata::ASSOCIATION_TYPE_EMBED_MANY:
                $this->loadEmbedManyCollection($collection);
                break;

            case PropertyMetadata::ASSOCIATION_TYPE_REFERENCE_MANY:
                if ($mapping->repositoryMethod !== null) {
                    $this->loadReferenceManyWithRepositoryMethod($collection);
                } else {
                    if ($mapping->isOwningSide) {
                        $this->loadReferenceManyCollectionOwningSide($collection);
                    } else {
                        $this->loadReferenceManyCollectionInverseSide($collection);
                    }
                }
                break;
        }
    }
58033
function load($filter=NULL,array $options=NULL,$ttl=0) {
		$this->reset();
		return ($this->query=$this->find($filter,$options,$ttl)) &&
			$this->skip(0)?$this->query[$this->ptr]:FALSE;
	}
1149075
private function doPersist(Config $config, array $config_to_persist)
    {
        foreach ($this->persistors as $persistor) {
            if (true === $persistor->persist($config, $config_to_persist)) {
                $this->application->getContainer()->get('container.builder')->removeContainerDump();
                break;
            }
        }
    }
236081
protected function findByFilterComponentsSourceSetup( $source )
    {

        // Set source defaults
        if( !( $source & ( self::PERSISTED | self::UNPERSISTED ) ) ) {
            $source += self::PERSISTED + self::UNPERSISTED;
        }

        if( !( $source & ( self::CHANGED | self::UNCHANGED ) ) ) {
            $source += self::CHANGED + self::UNCHANGED;
        }

        if( !( $source & ( self::WITH_CHILDREN | self::NO_CHILDREN ) ) ) {
            $source += self::WITH_CHILDREN;
        }

        if( !( $source & ( Base::DATA | Base::INITIAL ) ) ) {
            $source += Base::DATA;
        }

        return $source;

    }
1160921
protected function getPersistedParameters($persistedParameters = null)
    {
        $persistedParameters = ($persistedParameters ?: \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('persparam'));
        if (!is_array($persistedParameters)) {
            return null;
        }
        return array_filter($persistedParameters) ?: null;
    }
1329168
public function flush(PersistableInterface $persistable, $forget = true)
    {
        if ($forget)
        {
            $this->forget();
        }

        $code = $this->check();

        $entityManager = $this->getEntityManager();
        $queryBuilder = $entityManager->createQueryBuilder();

        $queryBuilder
            ->delete($this->entityName(), 'p')
            ->where('p.user = :persistable')
            ->andWhere('p.code != :code');

        $queryBuilder->setParameters([
            'persistable' => $persistable,
            'code'        => $code
        ]);

        $queryBuilder->getQuery()->execute();
    }
590866
public function attachPersistor(PersistorInterface $persistor, $key = '')
    {
        if (empty($key)) {
            $this->persistors[] = $persistor;
        } else {
            $this->persistors[$key] = $persistor;
        }
    }