class OneBoxResultSet in Google Search Appliance 8
Defines a value object for a one-box result set.
Hierarchy
- class \Drupal\google_appliance\SearchResults\OneBoxResultSet
Expanded class hierarchy of OneBoxResultSet
1 file declares its use of OneBoxResultSet
- Parser.php in src/
Service/ Parser.php
File
- src/
SearchResults/ OneBoxResultSet.php, line 8
Namespace
Drupal\google_appliance\SearchResultsView source
class OneBoxResultSet {
/**
* Module name.
*
* @var string
*/
protected $moduleName;
/**
* Provider.
*
* @var string
*/
protected $provider;
/**
* URL text.
*
* @var string
*/
protected $urlText;
/**
* URL link.
*
* @var string
*/
protected $urlLink;
/**
* Image.
*
* @var string
*/
protected $image;
/**
* Description.
*
* @var string
*/
protected $description;
/**
* Results.
*
* @var \Drupal\google_appliance\SearchResults\OneBoxResult[]
*/
protected $results = [];
/**
* Constructs a new OneBoxResultSet object.
*
* @param string $moduleName
* Module name.
* @param string $provider
* Provider.
* @param string $urlText
* URL text.
* @param string $urlLink
* URL link.
* @param string $image
* Image.
* @param string $description
* Description.
*/
public function __construct($moduleName, $provider, $urlText, $urlLink, $image, $description) {
$this->moduleName = $moduleName;
$this->provider = $provider;
$this->urlText = $urlText;
$this->urlLink = $urlLink;
$this->image = $image;
$this->description = $description;
}
/**
* Adds a result.
*
* @param \Drupal\google_appliance\SearchResults\OneBoxResult $result
* The result.
*
* @return $this
*/
public function addResult(OneBoxResult $result) {
$this->results[] = $result;
return $this;
}
/**
* Gets value of moduleName.
*
* @return string
* Value of moduleName
*/
public function getModuleName() {
return $this->moduleName;
}
/**
* Gets value of provider.
*
* @return string
* Value of provider
*/
public function getProvider() {
return $this->provider;
}
/**
* Gets value of urlText.
*
* @return string
* Value of urlText
*/
public function getUrlText() {
return $this->urlText;
}
/**
* Gets value of urlLink.
*
* @return string
* Value of urlLink
*/
public function getUrlLink() {
return $this->urlLink;
}
/**
* Gets value of image.
*
* @return string
* Value of image
*/
public function getImage() {
return $this->image;
}
/**
* Gets value of description.
*
* @return string
* Value of description
*/
public function getDescription() {
return $this->description;
}
/**
* Gets value of results.
*
* @return \Drupal\google_appliance\SearchResults\OneBoxResult[]
* Value of results
*/
public function getResults() {
return $this->results;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OneBoxResultSet:: |
protected | property | Description. | |
OneBoxResultSet:: |
protected | property | Image. | |
OneBoxResultSet:: |
protected | property | Module name. | |
OneBoxResultSet:: |
protected | property | Provider. | |
OneBoxResultSet:: |
protected | property | Results. | |
OneBoxResultSet:: |
protected | property | URL link. | |
OneBoxResultSet:: |
protected | property | URL text. | |
OneBoxResultSet:: |
public | function | Adds a result. | |
OneBoxResultSet:: |
public | function | Gets value of description. | |
OneBoxResultSet:: |
public | function | Gets value of image. | |
OneBoxResultSet:: |
public | function | Gets value of moduleName. | |
OneBoxResultSet:: |
public | function | Gets value of provider. | |
OneBoxResultSet:: |
public | function | Gets value of results. | |
OneBoxResultSet:: |
public | function | Gets value of urlLink. | |
OneBoxResultSet:: |
public | function | Gets value of urlText. | |
OneBoxResultSet:: |
public | function | Constructs a new OneBoxResultSet object. |