Returns node types by ids

@param array|string $ids
@return Collection
7253
public function getNodeTypesByIds($ids)
    {
        if (empty($ids))
        {
            return null;
        }

        if (is_string($ids))
        {
            $ids = json_decode($ids, true);
        }

        if (is_array($ids) && ! empty($ids))
        {
            $model = $this->getModelName();

            $placeholders = implode(',', array_fill(0, count($ids), '?'));

            $nodeTypes = $model::whereIn('id', $ids)
                ->orderByRaw('field(id,' . $placeholders . ')', $ids)
                ->get();

            return (count($nodeTypes) > 0) ? $nodeTypes : null;
        }

        return null;
    }
428956
public function findManyByIds(array $ids)
    {
        $models = $this->model->whereIn($this->model->getKeyName(), array_unique($ids))
            ->get();

        return $models;
    }
571952
public function getFormJson(array $ids)
    {
        $values = [];
        foreach ($this->getValues($ids) as $id => $value) {
            $id = strtolower(preg_replace('/[A-Z]/', '-$0', strtr($id, ['.' => '-', '_' => '-'])));
            $values['js-' . $id] = $value;
        }

        return json_encode($values, JSON_UNESCAPED_UNICODE);
    }
198403
public function modelsFromIds($ids)
    {
        // We need a Model in order to save this relationship so we try
        // to whereIn the given id(s) through the related model.
        return $this->related->whereIn($this->related->getKeyName(), (array) $ids)->get();
    }
20891
public function getFiles($ids)
    {
        settype($ids, 'array');

        $libraries = $this->getList();
        $sorted = $this->graph->sort($ids, $libraries);

        if (empty($sorted)) {
            return array();
        }

        return $this->prepareFiles($sorted, $libraries);
    }
992819
public static function findByIds($ids, $throwException = true)
    {
        $ids = array_unique($ids);
        $ids = array_map('intval', $ids);
        $ids2find = array_diff($ids, array_keys(static::$identityMap));
        if (count($ids2find) > 0) {
            Property::find()->where(['in', 'id', $ids2find])->all();
        }

        return array_reduce(
            $ids,
            function ($carry, $id) use ($throwException) {
                if (isset(static::$identityMap[$id])) {
                    $carry[$id] = static::$identityMap[$id];
                } elseif ($throwException) {
                    throw new \RuntimeException("Property $id not found");
                }
                return $carry;
            },
            []
        );
    }
350365
protected function _getSeqIds(Horde_Imap_Client_Ids $ids)
    {
        if (!count($ids)) {
            $status = $this->status($this->_selected, Horde_Imap_Client::STATUS_MESSAGES);
            return range(1, $status['messages']);
        } elseif ($ids->sequence) {
            return $ids->ids;
        }

        return array_keys(array_intersect($this->_pop3Cache('uidl'), $ids->ids));
    }
379230
protected function newQueryForCollectionRestoration(array $ids)
    {
        if (! Str::contains($ids[0], ':')) {
            return parent::newQueryForRestoration($ids);
        }

        $query = $this->newQueryWithoutScopes();

        foreach ($ids as $id) {
            $segments = explode(':', $id);

            $query->orWhere(function ($query) use ($segments) {
                return $query->where($segments[0], $segments[1])
                    ->where($segments[2], $segments[3]);
            });
        }

        return $query;
    }
121695
public function ids(array $ids = null) {
        if ($ids === null) {
            return $this->ids;
        }

        $this->ids = $ids;

        return $this;
    }
451322
public function getMany(array $ids) {
		$event  = $this->getProfiler()->startRead('Get (' . count($ids) . '): ' . implode(', ', $ids));
		$result = $this->getBackend()->getMany($ids);
		
		if (empty($result)) {
			$event->stopNotice();
		} else {
			$event->stopSuccess();
		}
		
		return $result;
	}
1179807
public function findByIds($ids)
    {
        if (!is_array($ids)) {
            $ids = explode(',', $ids);
        }

        $items = $this->createValuedQueryBuilder('c')
            ->andWhere('c.id IN (:ids)')->setParameter('ids', $ids)
            ->andWhere('c.deletedAt IS NULL')
            ->getQuery()->useResultCache(true, self::CACHE_TTL)->getResult();

        return $this->sortByArray($items, $ids);
    }
1088152
private function getImages(array $ids)
    {
        if (empty($ids)) {
            return [];
        }

        $qb = $this->getImageRepository()->createQueryBuilder('o');

        $images = $qb
            ->where($qb->expr()->in('o.id', $ids))
            ->orderBy('o.position')
            ->getQuery()
            ->getResult();

        if (count($images) !== count($ids)) {
            throw $this->createNotFoundException('Unable to find one or more images.');
        }

        return $images;
    }
686555
private function getItemById(array $ids)
    {
        $ids = array_map('intval', $ids);

        try {
            $stmtResult = $this->neo4jClient->run('MATCH (n) WHERE ID(n) IN {ids} RETURN n', ['ids' => $ids]);
        } catch (\Exception $e) {
            return [];
        }

        $result = [];

        if (!$stmtResult->size()) {
            return $result;
        }

        foreach ($stmtResult->records() as $record) {
            $result[] = $record->get('n');
        }

        return $result;
    }
1100492
public function getListByIds($ids, array $additionalFields = array())
    {
        return $this->getInternalList(
            'region/get',
            'Region',
            array(
                'id' => self::getArray($ids),
                'fields' => self::getArray($additionalFields)
            )
        );
    }
16406
protected function gatherIdsFromTree(array $array, array $ids = array())
    {
        foreach ($array as $item) {
            $ids[] = $item['id'];
            if (isset($item['__children']) && count($item['__children'])) {
                $ids = $this->gatherIdsFromTree($item['__children'], $ids);
            }
        }

        return $ids;
    }
1314544
protected function _getAttributes( array $ids )
	{
		if( empty( $ids ) ) {
			return array();
		}

		$attrManager = MShop_Factory::createManager( $this->_getContext(), 'attribute' );

		$search = $attrManager->createSearch( true );
		$expr = array(
			$search->compare( '==', 'attribute.id', $ids ),
			$search->getConditions(),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );

		return $attrManager->searchItems( $search, array( 'price' ) );
	}
893724
protected function _getAttributeItems( $ids )
	{
		$manager = $this->getSubManager( 'attribute' );
		$search = $manager->createSearch();
		$search->setConditions( $search->compare( '==', 'order.base.service.attribute.serviceid', $ids ) );
		$search->setSortations( array( $search->sort( '+', 'order.base.service.attribute.code' ) ) );
		$search->setSlice( 0, 0x7fffffff );

		$result = array();
		foreach ($manager->searchItems( $search ) as $item) {
			$result[ $item->getServiceId() ][ $item->getId() ] = $item;
		}

		return $result;
	}