本文整理匯總了PHP中Shopware\Tests\Mink\Helper::getUnique方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helper::getUnique方法的具體用法?PHP Helper::getUnique怎麽用?PHP Helper::getUnique使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Shopware\Tests\Mink\Helper
的用法示例。
在下文中一共展示了Helper::getUnique方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getNameProperty
/**
* Returns the name
* @param NodeElement $slide
* @return string
*/
public function getNameProperty(NodeElement $slide)
{
$selectors = Helper::getRequiredSelectors($this, ['slideImage', 'slideLink', 'slideName']);
$nameElement = $slide->find('css', $selectors['slideName']);
$names = ['imageAlt' => $slide->find('css', $selectors['slideImage'])->getAttribute('alt'), 'linkTitle' => $slide->find('css', $selectors['slideLink'])->getAttribute('title'), 'name' => $nameElement->getText(), 'nameTitle' => $nameElement->getAttribute('title')];
return Helper::getUnique($names);
}
示例2: getLinkProperty
/**
* Returns the link to the blog article
* @param NodeElement $article
* @return string
*/
public function getLinkProperty(NodeElement $article)
{
$selectors = Helper::getRequiredSelectors($this, ['articleTitle', 'articleLink']);
$links = ['titleLink' => $article->find('css', $selectors['articleTitle'])->getAttribute('href'), 'link' => $article->find('css', $selectors['articleLink'])->getAttribute('href')];
return Helper::getUnique($links);
}
示例3: getNameProperty
/**
* Returns the category name
* @return array[]
*/
public function getNameProperty()
{
$elements = Helper::findElements($this, ['name', 'link']);
$names = [$elements['name']->getText(), $elements['link']->getAttribute('title')];
return Helper::getUnique($names);
}
示例4: getNumberProperty
/**
* Returns the order number
* @return string
*/
public function getNumberProperty()
{
$elements = Helper::findElements($this, ['number', 'footerNumber']);
$numbers = ['orderNumber' => $elements['number']->getText(), 'footerNumber' => $elements['footerNumber']->getText()];
return Helper::getUnique($numbers);
}
示例5: getLinkProperty
/**
* Returns the link to the product
* @return string
*/
public function getLinkProperty()
{
$elements = Helper::findElements($this, ['name', 'thumbnailLink', 'detailLink']);
$names = array('articleNameLink' => $elements['name']->getAttribute('href'), 'articleThumbnailLink' => $elements['thumbnailLink']->getAttribute('href'), 'articleDetailLink' => $elements['detailLink']->getAttribute('href'));
return Helper::getUnique($names);
}
示例6: getLinkProperty
/**
* @return string
*/
public function getLinkProperty()
{
$elements = Helper::findElements($this, ['name', 'link', 'more']);
$links = [$elements['name']->getAttribute('href'), $elements['link']->getAttribute('href'), $elements['more']->getAttribute('href')];
return Helper::getUnique($links);
}