当前位置: 首页>>代码示例>>PHP>>正文


PHP Helper::searchElements方法代码示例

本文整理汇总了PHP中Shopware\Tests\Mink\Helper::searchElements方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::searchElements方法的具体用法?PHP Helper::searchElements怎么用?PHP Helper::searchElements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shopware\Tests\Mink\Helper的用法示例。


在下文中一共展示了Helper::searchElements方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkNoteProducts

 /**
  * @param NotePosition $notePositions
  * @param array $items
  */
 public function checkNoteProducts(NotePosition $notePositions, array $items)
 {
     Helper::assertElementCount($notePositions, count($items));
     $result = Helper::searchElements($items, $notePositions);
     if ($result !== true) {
         $messages = ['The following articles were not found:'];
         foreach ($result as $product) {
             $messages[] = $product['number'] . ' - ' . $product['name'];
         }
         Helper::throwException($messages);
     }
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:16,代码来源:Note.php

示例2: checkNoteProducts

 /**
  * @param NotePosition $notePositions
  * @param array $items
  */
 public function checkNoteProducts(NotePosition $notePositions, array $items)
 {
     if (count($notePositions) !== count($items)) {
         $message = sprintf('There are %d products on the note! (should be %d)', count($notePositions), count($items));
         Helper::throwException($message);
     }
     $result = Helper::searchElements($items, $notePositions);
     if ($result !== true) {
         $messages = array('The following articles were not found:');
         foreach ($result as $product) {
             $messages[] = $product['number'] . ' - ' . $product['name'];
         }
         Helper::throwException($messages);
     }
 }
开发者ID:BucherStoerzbachGbR,项目名称:shopware,代码行数:19,代码来源:Note.php

示例3: checkComparisonProducts

 /**
  * Checks the product comparison
  * Available properties are: image, name, ranking, description, price, link
  *
  * @param CompareColumn $compareColumns
  * @param array $items
  */
 public function checkComparisonProducts(CompareColumn $compareColumns, array $items)
 {
     if (count($compareColumns) !== count($items)) {
         $message = sprintf('There are %d products in the comparison! (should be %d)', count($compareColumns), count($items));
         Helper::throwException($message);
     }
     $result = Helper::searchElements($items, $compareColumns);
     if ($result !== true) {
         $messages = array('The following articles were not found:');
         foreach ($result as $product) {
             $messages[] = $product['name'];
         }
         Helper::throwException($messages);
     }
 }
开发者ID:BucherStoerzbachGbR,项目名称:shopware,代码行数:22,代码来源:Homepage.php

示例4: checkComparisonProducts

 /**
  * Checks the product comparison
  * Available properties are: image, name, ranking, description, price, link
  *
  * @param CompareColumn $compareColumns
  * @param array $items
  */
 public function checkComparisonProducts(CompareColumn $compareColumns, array $items)
 {
     Helper::assertElementCount($compareColumns, count($items));
     $result = Helper::searchElements($items, $compareColumns);
     if ($result !== true) {
         $messages = ['The following articles were not found:'];
         foreach ($result as $product) {
             $messages[] = $product['name'];
         }
         Helper::throwException($messages);
     }
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:19,代码来源:Homepage.php


注:本文中的Shopware\Tests\Mink\Helper::searchElements方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。