コード例 #1
0
ファイル: IndexPage.php プロジェクト: ReissClothing/Sylius
 /**
  * {@inheritdoc}
  */
 public function isOrderWithNumberInTheList($number)
 {
     try {
         $rows = $this->tableAccessor->getRowsWithFields($this->getElement('customer_orders'), ['number' => $number]);
         return 1 === count($rows);
     } catch (\InvalidArgumentException $exception) {
         return false;
     }
 }
コード例 #2
0
ファイル: IndexPage.php プロジェクト: ahmadrabie/Sylius
 /**
  * {@inheritdoc}
  */
 public function isResourceOnPage(array $parameters)
 {
     try {
         $rows = $this->tableAccessor->getRowsWithFields($this->getElement('table'), $parameters);
         return 1 === count($rows);
     } catch (\InvalidArgumentException $exception) {
         return false;
     } catch (ElementNotFoundException $exception) {
         return false;
     }
 }
コード例 #3
0
ファイル: IndexPage.php プロジェクト: NeverResponse/Sylius
 /**
  * {@inheritdoc}
  */
 public function isSingleResourceWithSpecificElementOnPage(array $parameters, $element)
 {
     try {
         $rows = $this->tableAccessor->getRowsWithFields($this->getElement('table'), $parameters);
         if (1 !== count($rows)) {
             return false;
         }
         return null !== $rows[0]->find('css', $element);
     } catch (\InvalidArgumentException $exception) {
         return false;
     } catch (ElementNotFoundException $exception) {
         return false;
     }
 }
コード例 #4
0
ファイル: ShowPage.php プロジェクト: gabiudrescu/Sylius
 /**
  * {@inheritdoc}
  */
 public function isProductInTheList($name)
 {
     try {
         $rows = $this->tableAccessor->getRowsWithFields($this->getElement('order_items'), ['item' => $name]);
         return 1 === count($rows);
     } catch (\InvalidArgumentException $exception) {
         return false;
     }
 }
コード例 #5
0
ファイル: ShowPage.php プロジェクト: ReissClothing/Sylius
 /**
  * @param string $itemName
  * @param string $property
  *
  * @return string
  */
 private function getItemProperty($itemName, $property)
 {
     $rows = $this->tableAccessor->getRowsWithFields($this->getElement('table'), ['item' => $itemName]);
     return $rows[0]->find('css', '.' . $property)->getText();
 }
コード例 #6
0
ファイル: OrderPaymentsPage.php プロジェクト: rpg600/Sylius
 /**
  * {@inheritdoc}
  */
 public function countPaymentWithSpecificState($state)
 {
     $rows = $this->tableAccessor->getRowsWithFields($this->getElement('table'), ['state' => $state]);
     return count($rows);
 }