本文整理汇总了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);
}