This method will try to find a price based on the unique constraint defined in price.

@param PriceInterface $searchPrice

@return PriceInterface|null
7606
protected function findPrice(PriceInterface $searchPrice): ?PriceInterface
    {
        foreach ($this->prices as $price) {
            if ($price->getAmount() == $searchPrice->getAmount() && $price->getB2bGroupId() == $searchPrice->getB2bGroupId() && $price->getCurrency()->getId() == $searchPrice->getCurrency()->getId()) {
                return $price;
            }
        }

        return null;
    }
707867
public function getValueByPartialKey(array $array, string $searchingKey): ?string
    {
        foreach ($array as $key => $value) {
            if (false !== stripos($key, $searchingKey)) {
                return $value;
            }
        }

        return null;
    }
56995
protected function getValidSpecialPriceQuery()
    {
        $qb = $this->createQueryBuilder('specialPrice')
            ->leftJoin('specialPrice.product', 'product')
            ->leftJoin('product.status', 'productStatus')
            ->where(':now BETWEEN specialPrice.startDate AND specialPrice.endDate')
            ->andWhere('productStatus.id = :productStatus')
            ->setParameter('productStatus', Status::ACTIVE)
            ->setParameter('now', new \DateTime());

        return $qb;
    }
36168
public function getTotalRecurringNetPriceFormatted($locale = null)
    {
        return $this->priceFormatter->format((float)$this->entity->getTotalRecurringNetPrice(), null, $locale);
    }
515865
public function getPrice()
    {
        if (empty($this->price)) {
            throw new LogicException(
                sprintf(self::ERROR_MISSING_ATTRIBUTE_FORMAT, 'price')
            );
        }
        return $this->price;
    }
613575
public function getPrice($price, $discount, $request)
    {
        if(!$this->isValid($discount, $request))
            throw new Discount_Exception_InvalidDiscount();
        $newPrice = $price - ($price * $discount->off_value / 100);
        return $newPrice;
    }
25073
public function createConditionalAvailabilitySkuSearchQuery(?string $searchString): QueryInterface
    {
        $searchQuery = $this->getConditionalAvailabilitySkuSearchQueryPlugin();
        if ($searchQuery instanceof SearchStringSetterInterface) {
            $searchQuery->setSearchString($searchString);
        }

        return $searchQuery;
    }
523867
public function query($searchString)
    {
        $this->searchString = substr(\DB::connection()->getPdo()->quote($searchString), 1, -1);

        return $this;
    }
1302865
public function setPrice($price)
    {
        if ($price instanceof Amount) {
            $price = $price->getNumber();
        }
        $this->price = $price;

        return $this;
    }
786286
public function loadPriceIds($dPriceFrom, $dPriceTo)
    {
        $sSelect = $this->_getPriceSelect($dPriceFrom, $dPriceTo);
        $this->_createIdListFromSql($sSelect);
    }
1030570
public function find($searchCriteria = false, $returnArray = false)
    {
        $result = array();

        if (is_int($searchCriteria)) {
            $primaryKeyValueForSearch = intval($searchCriteria);
            $result = $this->_db_adapter->getOneResult($this->_table_name, array($this->_primary_key => $primaryKeyValueForSearch));
        } else if (is_array($searchCriteria) && !empty($searchCriteria)) {
            $limit = isset($searchCriteria['limit']) ? $searchCriteria['limit'] : 0;
            unset($searchCriteria['limit']);
            $result = $this->_db_adapter->Select($this->_table_name, $searchCriteria, $limit);
        } else if(empty($searchCriteria) || !$searchCriteria) {
            $result = $this->_db_adapter->Select($this->_table_name);
        }

        if($returnArray) {
            return $result;
        }

        return $this->convertSearchResultIntoBean($result);
    }
574919
public function visitUniqueItemsConstraint(ArrayValue\UniqueItemsConstraint $constraint)
    {
        $value = $this->currentValue();
        if (
            !$value instanceof Value\ArrayValue ||
            !$constraint->value() ||
            $this->comparator->equals(
                $value->value(),
                $this->unique($value->value())
            )
        ) {
            return $this->createResult();
        }

        return $this->createSingleIssueResult($constraint);
    }
872091
public function getFProposedPrice()
    {
        if ($this->_fProposedPrice == null) {
            $this->_fProposedPrice = false;
            if ($oThisCurr = $this->getPriceAlarmCurrency()) {
                $myLang = \OxidEsales\Eshop\Core\Registry::getLang();
                $this->_fProposedPrice = $myLang->formatCurrency($this->oxpricealarm__oxprice->value, $oThisCurr);
            }
        }

        return $this->_fProposedPrice;
    }
797882
protected function checkPriceFormat($price)
    {
        if ($price === '0') {
            return;
        }
        $converted = (float)$price;
        if ($converted == 0) {
            throw new \Bitpay\Client\ArgumentException("Price must be formatted as a float ". $converted);
        }
    }
83441
public function findMember($searchTerm) {
		$term = Convert::raw2sql($searchTerm);
		$current = (int) $this->securityContext->getMember()->ID;
		$filter = '("Username" LIKE \'' . $term .'%\' OR "FirstName" LIKE \'' . $term .'%\' OR "Surname" LIKE \'' . $term . '%\') AND "ID" <> ' . $current;

		$items = DataList::create('Member')->where($filter)->restrict();
		
		return $items;
	}
1031949
public function getPrice()
    {
        if (is_null($this->_oPrice)) {
            /** @var \OxidEsales\Eshop\Core\Price $price */
            $price = oxNew(\OxidEsales\Eshop\Core\Price::class);
            $this->setPrice($price);
        }

        return $this->_oPrice;
    }
339243
public function findModels($searchQuery, $regionId, $page = null, $pageSize = null, $currency = null)
    {
        $resource = sprintf('models.%s', self::DECODE_TYPE_DEFAULT);
        $queryParams = $this->filterParams([
            'query' => $searchQuery,
            'regionId' => $regionId,
            'page' => $page,
            'pageSize' => $pageSize,
            'currency' => $currency,
        ]);

        $response = $this->sendRequest('GET', $this->getServiceUrl($resource), ['query' => $queryParams]);
        $decodedResponseBody = $this->getDecodedBody($response->getBody());

        return new GetMarketModelsResponse($decodedResponseBody);
    }