protected function CommerceAddToCartLinkViewsField::getUrlInfo in Commerce Add To Cart Link 8
Same name and namespace in other branches
- 2.x src/Plugin/views/field/CommerceAddToCartLinkViewsField.php \Drupal\commerce_add_to_cart_link\Plugin\views\field\CommerceAddToCartLinkViewsField::getUrlInfo()
Returns the URI elements of the link.
Parameters
\Drupal\views\ResultRow $row: A view result row.
Return value
\Drupal\Core\Url The URI elements of the link.
Overrides LinkBase::getUrlInfo
File
- src/
Plugin/ views/ field/ CommerceAddToCartLinkViewsField.php, line 70
Class
- CommerceAddToCartLinkViewsField
- Defines a Views field that adds an add to cart link.
Namespace
Drupal\commerce_add_to_cart_link\Plugin\views\fieldCode
protected function getUrlInfo(ResultRow $row) {
$id = $this
->getValue($row);
return $this
->getUrl($id);
}