本文整理匯總了PHP中Sylius\Component\Core\Model\ProductInterface::getSlug方法的典型用法代碼示例。如果您正苦於以下問題:PHP ProductInterface::getSlug方法的具體用法?PHP ProductInterface::getSlug怎麽用?PHP ProductInterface::getSlug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sylius\Component\Core\Model\ProductInterface
的用法示例。
在下文中一共展示了ProductInterface::getSlug方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: iWantToReviewProduct
/**
* @Given I want to review product :product
*/
public function iWantToReviewProduct(ProductInterface $product)
{
$this->createPage->open(['slug' => $product->getSlug()]);
}
示例2: iShouldBeOnProductDetailedPage
/**
* @Then I should be on :product product detailed 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()));
}
示例3: thisProductAverageRatingShouldBe
/**
* @Then /^average rating of (product "[^"]+") should be (\d+)$/
*/
public function thisProductAverageRatingShouldBe(ProductInterface $product, $averageRating)
{
$this->showPage->tryToOpen(['slug' => $product->getSlug()]);
$this->iShouldSeeAsItsAverageRating($averageRating);
}
示例4: iCheckThisProductSReviews
/**
* @When /^I check (this product)'s reviews$/
*/
public function iCheckThisProductSReviews(ProductInterface $product)
{
$this->productReviewsIndexPage->open(['slug' => $product->getSlug()]);
}