Load the list by article ids

@param array $aIds Article ID array

@return null;
548414
public function loadIds($aIds)
    {
        if (!count($aIds)) {
            $this->clear();

            return;
        }

        $oBaseObject = $this->getBaseObject();
        $sArticleTable = $oBaseObject->getViewName();
        $sArticleFields = $oBaseObject->getSelectFields();

        $oxIdsSql = implode(',', \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aIds));

        $sSelect = "select $sArticleFields from $sArticleTable ";
        $sSelect .= "where $sArticleTable.oxid in ( " . $oxIdsSql . " ) and ";
        $sSelect .= $oBaseObject->getSqlActiveSnippet();

        $this->selectString($sSelect);
    }
1061512
public function deleteMany(array $aIds): bool
    {
        $oDb = Factory::service('Database');
        try {
            $oDb->trans_begin();
            foreach ($aIds as $iId) {
                if (!$this->delete($iId)) {
                    throw new ModelException('Failed to delete item with ID ' . $iId);
                }
            }
            $oDb->trans_commit();
            return true;
        } catch (\Exception $e) {
            $oDb->trans_rollback();
            $this->setError($e->getMessage());
            return false;
        }
    }
1006665
public function loadFiles($assets)
    {
        foreach ($assets as $type => $item) {
            $addMethod = 'load' . ucfirst($type);

            if (method_exists($this, $addMethod)) {
                call_user_func_array([&$this, $addMethod], [$item]);
            }
        }
    }
486004
public function loadColumn($index = 0)
    {
        if ($this->stmt === null) {
            return null;
        }

        $columnList = array();
        while ($row = $this->stmt->fetch(\PDO::FETCH_NUM)) {
            $columnList[] = $row[$index];
        }
        return $columnList;
    }
887033
public function loadFromArray(array $items)
    {
        foreach ($items as $item) {
            if (is_array($item) && ! empty($item)) {
                $this->add($item);
            }
        }

        return $this;
    }
923124
private function loadExtensions($extensions)
    {
        $extensions = Arr::wrap($extensions);

        foreach ($extensions as $extension) {
            $extension = 'ext'.$extension;

            if (method_exists($this, $extension)) {
                $this->$extension();
            }
        }
    }
1036009
function load($data = [])
    {
        foreach ($this as $k => $v) {
            if ($k == 'table' || $k == 'where') {
                continue;
            }
            if (isset($data[$k])) {
                $this->$k = $data[$k];
            }
        }
    }
1061784
function load($key,$val) {
		if ($found=$this->find($key,$val)) {
			$this->id=$found[0]->id;
			return $this->item=$found[0]->item;
		}
		$this->reset();
		return [];
	}
997598
protected function LoadArticleList()
    {
        if (is_null($this->oList)) {
            parent::LoadArticleList();
            if (!is_null($this->oList) && '1' == $this->global->GetUserData(TdbPkgShopListfilter::URL_PARAMETER_IS_NEW_REQUEST)) {
                TdbShop::ResetAllRegisteredActiveVariantsForAllSpots();
                $this->iPage = 0;
                $this->oList->RestorePagingInfoFromSession($this->iPageSize * $this->iPage, $this->iPageSize);
                $this->oList->JumpToPage(0);
            }
        }
    }
1280264
public function loadGroupsFrom(array $items = [], $withAccess = false)
    {
        $idList = [];

        foreach ($items as $item) {
            if (is_numeric($item)) {
                $groupId = (int)$item;
            } else if ($item instanceof GroupMember) {
                $groupId = $item->getGroupId();
            } else if ($item instanceof GroupSite) {
                $groupId = $item->getGroupId();
            } else {
                throw new \InvalidArgumentException(sprintf("given input is nor an integer nor a %s nor %s instance", GroupMember::class, GroupSite::class));
            }
            // Avoid duplicates
            $idList[$groupId] = $groupId;
        }

        if (!$idList) {
            return [];
        }

        return $this->loadAll($idList, $withAccess);
    }
451597
public function getArticles($iStart = null, $iNrofArticles = null, $blReload = false)
    {
        // cached ?
        if ($this->_oArticles !== null && !$blReload) {
            return $this->_oArticles;
        }

        $this->_oArticles = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);

        if ($iStart !== null && $iNrofArticles !== null) {
            $this->_oArticles->setSqlLimit($iStart, $iNrofArticles);
        }

        // loading basket items
        $this->_oArticles->loadRecommArticles($this->getId(), $this->_sArticlesFilter);

        return $this->_oArticles;
    }
1100114
public function loadObject($params=array()) {

		$this->openConnection();
		
		$obj = NULL;
		
		try {
			
			$stat = $this->handler->prepare($this->query);
			$stat->execute((array)$params);
			$obj = $stat->fetch(\PDO::FETCH_OBJ);
			
			// logger
			$this->logParamQuery($this->query, (bool)$obj, $params);

		} catch (\PDOException $e) {

			$this->handleException($e, $params);
		
		}
		
		$stat->closeCursor();

		return $obj;
		
	}
1046461
public function loadAssoc()
	{
		$this->connect();

		$ret = null;

		// Execute the query and get the result set cursor.
		if (!($cursor = $this->execute()))
		{
			return;
		}

		// Get the first row from the result set as an associative array.
		$array = $this->fetchAssoc($cursor);

		if ($array)
		{
			$ret = $array;
		}

		// Free up system resources and return.
		$this->freeResult($cursor);

		return $ret;
	}
347861
private function loadModels(array $items)
    {
        $classes = [];
        $results = [];

        // Retrieve a list of keys to load from each class.
        foreach ($items as $item) {
            if (!is_null($item['key'])) {
                $classes[$item['class']][] = $item['key'];
            }
        }

        // Iterate list of classes and load all records matching a key.
        foreach ($classes as $class => $keys) {
            $model = new $class();
            $results[$class] = $model->whereIn($model->getKeyName(), $keys)->get()->keyBy($model->getKeyName());
        }

        return $results;
    }
838832
public function loadFromArray(array $array)
    {
        if (isset($array['filename'])) {
            $this->filename = $array['filename'];
        }

        if (isset($array['size'])) {
            $this->size = $array['size'];
        }

        if (isset($array['type'])) {
            $this->type = $array['type'];
        }

        if (isset($array['cid'])) {
            $this->cid = $array['cid'];
        }

        if (isset($array['href'])) {
            $this->href = $array['href'];
        }

        return $this;
    }
643409
public function load($files)
    {
        if (!is_array($files)) {
            $files = [$files];
        }
        foreach ($files as $file) {
            $file = new File($file);
            $extName = $file->extName();
            if ($extName == 'json') {
                $data = json_decode($file->readAll(), true);
                if (!$data) {
                    throw new \Exception("File '{$file}' is not valid JSON");
                }
            } else {
                $data = require (string) $file;
            }
            $this->fromArray($data);
        }
    }
719106
protected function getLr($ids)
    {
        $class = $this->className;
        return $class::find()
            ->select(['id', $this->leftAttribute, $this->rightAttribute])
            ->where(['id' => $ids])
            ->indexBy('id')
            ->asArray(true)
            ->all();
    }