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


PHP ProductInterface::getName方法代码示例

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


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

示例1: iShouldBeOnProductDetailedPage

 /**
  * @Then I should be on :product product detailed page
  * @Then I should still be on product :product page
  */
 public function iShouldBeOnProductDetailedPage(ProductInterface $product)
 {
     Assert::true($this->showPage->isOpen(['slug' => $product->getSlug()]), sprintf('Product %s show page should be open, but it does not.', $product->getName()));
 }
开发者ID:sylius,项目名称:sylius,代码行数:8,代码来源:ProductContext.php

示例2: getProductRowElement

 /**
  * @param ProductInterface $product
  *
  * @return NodeElement
  */
 private function getProductRowElement(ProductInterface $product)
 {
     return $this->getElement('product_row', ['%name%' => $product->getName()]);
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:9,代码来源:CompletePage.php

示例3: thisProductShouldNoLongerHavePriceForChannel

 /**
  * @Then /^(this product) should no longer have price for channel "([^"]+)"$/
  */
 public function thisProductShouldNoLongerHavePriceForChannel(ProductInterface $product, $channelName)
 {
     $this->updateSimpleProductPage->open(['id' => $product->getId()]);
     try {
         $this->updateSimpleProductPage->getPriceForChannel($channelName);
     } catch (ElementNotFoundException $exception) {
         return;
     }
     throw new \Exception(sprintf('Product "%s" should not have price defined for channel "%s".', $product->getName(), $channelName));
 }
开发者ID:sylius,项目名称:sylius,代码行数:13,代码来源:ManagingProductsContext.php

示例4: productShouldNotHaveAttribute

 /**
  * @Then /^(product "[^"]+") should not have a "([^"]+)" attribute$/
  */
 public function productShouldNotHaveAttribute(ProductInterface $product, $attribute)
 {
     $this->updateSimpleProductPage->open(['id' => $product->getId()]);
     Assert::false($this->updateSimpleProductPage->hasAttribute($attribute), sprintf('Product "%s" should not have attribute "%s" but it does.', $product->getName(), $attribute));
 }
开发者ID:TheMadeleine,项目名称:Sylius,代码行数:8,代码来源:ManagingProductsContext.php

示例5: hasProductOutOfStockValidationMessage

 /**
  * {@inheritdoc]
  */
 public function hasProductOutOfStockValidationMessage(ProductInterface $product)
 {
     $message = sprintf('%s does not have sufficient stock.', $product->getName());
     try {
         return $this->getElement('validation_errors')->getText() === $message;
     } catch (ElementNotFoundException $exception) {
         return false;
     }
 }
开发者ID:origammi,项目名称:Sylius,代码行数:12,代码来源:SummaryPage.php

示例6: thereAreNoProductReviews

 /**
  * @Then /^there should be no reviews of (this product)$/
  */
 public function thereAreNoProductReviews(ProductInterface $product)
 {
     $this->productReviewIndexPage->open();
     Assert::false($this->productReviewIndexPage->isSingleResourceOnPage(['reviewSubject' => $product->getName()]), sprintf('There should be no reviews of %s.', $product->getName()));
 }
开发者ID:loic425,项目名称:Sylius,代码行数:8,代码来源:ManagingProductsContext.php

示例7: productPriceShouldNotBeDecreased

 /**
  * @Given /^(product "[^"]+") price should not be decreased$/
  */
 public function productPriceShouldNotBeDecreased(ProductInterface $product)
 {
     $this->cartSummaryPage->open();
     expect($this->cartSummaryPage->isItemDiscounted($product->getName()))->toBe(false);
 }
开发者ID:rpg600,项目名称:Sylius,代码行数:8,代码来源:CartContext.php

示例8: FailureException

 function it_throws_exception_if_discount_price_is_present_on_the_page_but_should_not(CartSummaryPageInterface $cartSummaryPage, ProductInterface $product)
 {
     $cartSummaryPage->open()->shouldBeCalled();
     $product->getName()->willReturn('Test product');
     $cartSummaryPage->isItemDiscounted('Test product')->willReturn(true);
     $this->shouldThrow(new FailureException('Expected <value>false</value>, but got <value>true</value>.'))->during('productPriceShouldNotBeDecreased', [$product]);
 }
开发者ID:ahmadrabie,项目名称:Sylius,代码行数:7,代码来源:CartContextSpec.php

示例9: thisProductIsAvailableInSize

 /**
  * @Given /^(this product) is available in "([^"]+)" ([^"]+) priced at ("[^"]+")$/
  */
 public function thisProductIsAvailableInSize(ProductInterface $product, $optionValueName, $optionName, $price)
 {
     /** @var ProductVariantInterface $variant */
     $variant = $this->productVariantFactory->createNew();
     $optionValue = $this->sharedStorage->get(sprintf('%s_option_%s_value', $optionValueName, $optionName));
     $variant->addOptionValue($optionValue);
     $variant->addChannelPricing($this->createChannelPricingForChannel($price, $this->sharedStorage->get('channel')));
     $variant->setCode(sprintf("%s_%s", $product->getCode(), $optionValueName));
     $variant->setName($product->getName());
     $product->addVariant($variant);
     $this->objectManager->flush();
 }
开发者ID:NeverResponse,项目名称:Sylius,代码行数:15,代码来源:ProductContext.php


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