Loads the data source for the supplied entity type.

@param string $entityType

@return IEntitySet
330676
public function loadDataSourceFor(string $entityType) : IEntitySet
    {
        $mapper = $this->orm->getEntityMapper($entityType);

        return new DbRepository($this->connection, $mapper);
    }
1215934
protected function loadEntities($entityManager) {
		foreach(glob($this->getPath().'/Entity/*.php') as $file) {
			$class = \Asgard\Common\Tools::loadClassFile($file);
			if(is_subclass_of($class, 'Asgard\Entity\Entity'))
				$entityManager->get($class);
		}
	}
80978
public function load(EntityInterface $entity)
    {
        $adapter = $this->getAdapter();

        $relTable = $this->getParentTableName();
        $relPmk = $this->getParentPrimaryKey();

        $table = $this->getEntityDescriptor()->getTableName();
        $pmk = $this->getEntityDescriptor()->getPrimaryKey();
        $fnk = $this->getForeignKey();

        $onClause = "{$relTable}.{$relPmk} = {$table}.{$fnk}";

        $data = Sql::createSql($adapter)
            ->select($relTable)
            ->join($table, $onClause, null)
            ->where([
                "{$table}.{$pmk->getField()} = :id" => [
                    ':id' => $entity->{$pmk->getName()}
                ]
            ])
            ->first();

        $relEntity = $this->getParentEntityMapper()->createFrom($data);

        return null == $relEntity ? null :$this->registerEntity($relEntity);
    }
351621
public function loadSectionDataByIdentifier($identifier)
    {
        $query = $this->dbHandler->createSelectQuery();
        $query->select(
            $this->dbHandler->quoteColumn('id'),
            $this->dbHandler->quoteColumn('identifier'),
            $this->dbHandler->quoteColumn('name')
        )->from(
            $this->dbHandler->quoteTable('ezsection')
        )->where(
            $query->expr->eq(
                $this->dbHandler->quoteColumn('identifier'),
                $query->bindValue($identifier, null, \PDO::PARAM_STR)
            )
        );

        $statement = $query->prepare();
        $statement->execute();

        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }
369966
public function get(string $hash): ?EntityInterface
    {
        $result = null;
        $content = $this->loadContent($hash);
        if ($content !== null) {
            $result = $this->createEntityFromContent($content);
        }
        return $result;
    }
437695
protected function loadResource(string $entityClass, string $rel)
    {
        $uri = $this->resource->getLinks()->getHref($rel);

        return $this->restClient->getResource($entityClass, $uri)->getEntity();
    }
696745
public function findAllByEntityId($entityId)
    {

        // prepare the params
        $params = array(ParamNames::ENTITY_ID => $entityId);

        // load and return the customer varchar attributes with the passed entity ID
        $this->customerVarcharsStmt->execute($params);
        return $this->customerVarcharsStmt->fetchAll(\PDO::FETCH_ASSOC);
    }
468452
protected function loadEntity()
    {
        $params = array_merge($this->params()->fromPost(), $this->params()->fromRoute());
        if (empty($params['id'])) {
            throw new EntityNotFoundException('Bad Request');
        }

        $objectManager = $this->getServiceLocator()->get('Doctrine\ORM\EntityManager');

        if (!$model = $objectManager->getRepository(get_class($this->getEntity()))->find($params['id'])) {
            throw new EntityNotFoundException('Entity not found');
        }
        return $model;
    }
507154
protected function loadResources(string $entityClass, string $rel): Collection
    {
        $uri = $this->resource->getLinks()->getHref($rel);
        $resources = $this->restClient->getResources($entityClass, $rel, $uri);

        $entities = $resources->map(function (HalResource $resource) {
            return $resource->getEntity();
        });

        return new Collection($entities);
    }
634891
protected function loadDataTypeData() {
    if (!isset($this->dataTypesData)) {
      $this->dataTypesData = $this->environment->getStorage()->retrieve('data_types');
    }

    return $this->dataTypesData;
  }
688231
protected function lookUpEntity($entityId) {
        $entity = $this->generateEntity();
        $entityInstance = $entity->findFirst($entityId);
        if($entityInstance === false) {
            throw new Exception("Invalid Entity Id: Entity not found.", 404);
        }
        return $entityInstance;
    }
233355
public function getUserEntity($user)
    {
        if (is_numeric($user)) {
            $userEntity = $this->entityTypeManager
                ->getStorage('user')
                ->load($user);
        } else {
            $userEntities = $this->entityTypeManager
                ->getStorage('user')
                ->loadByProperties(['name' => $user]);
            $userEntity = reset($userEntities);
        }

        return $userEntity;
    }
485110
public function get($entityId)
    {
        $key = $this->getEntityDescriptor()->className();
        $key .= '::'.$entityId;
        $entity = $this->getIdentityMap()->get($key, false);
        if ($entity === false) {
            $entity = $this->load($entityId);
        }
        return $entity;
    }
312370
protected function _loadFromDb($iType)
    {
        $sSql = $this->_getSQLByType($iType);
        $aData = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sSql);

        return $aData;
    }
1311431
public function getEntityClass($type)
    {
        if (!isset($this->config['entity_class'][$type])) {
            throw new Exception("You are trying to access a configuration that does not exists.");
        }

        return $this->config['entity_class'][$type];
    }
815867
protected function getEntity($entityId)
    {
        $entity = $this->getRepository()->get($entityId);
        if (!$entity instanceof EntityInterface) {
            throw new EntityNotFoundException(
                "There are no entities with provided entity ID."
            );
        }
        return $entity;
    }
376366
public function required(string $alias, string $type): EntityDefinitionOptions {
    return $this->required[$alias] = new EntityDefinitionOptions($alias, $type);
  }