interface ResultInterface in Facets 8
The interface defining what a facet result should look like.
Hierarchy
- interface \Drupal\facets\Result\ResultInterface
Expanded class hierarchy of ResultInterface
All classes that implement ResultInterface
7 files declare their use of ResultInterface
- ArrayWidget.php in src/
Plugin/ facets/ widget/ ArrayWidget.php - QueryStringCreated.php in src/
Event/ QueryStringCreated.php - QueryStringTest.php in tests/
src/ Unit/ Plugin/ url_processor/ QueryStringTest.php - SearchApiDateTest.php in tests/
src/ Kernel/ Plugin/ query_type/ SearchApiDateTest.php - SearchApiGranularTest.php in tests/
src/ Unit/ Plugin/ query_type/ SearchApiGranularTest.php
File
- src/
Result/ ResultInterface.php, line 10
Namespace
Drupal\facets\ResultView source
interface ResultInterface {
/**
* Returns the facet related to the result.
*
* @return \Drupal\facets\FacetInterface
* The facet related to the result.
*/
public function getFacet();
/**
* Returns the raw value as present in the index.
*
* @return string
* The raw value of the result.
*/
public function getRawValue();
/**
* Returns the display value as present in the index.
*
* @return string
* The formatted value of the result.
*/
public function getDisplayValue();
/**
* Returns the count for the result.
*
* @return int
* The amount of items for the result.
*/
public function getCount();
/**
* Sets the count for the result.
*
* @param int $count
* The amount of items for the result.
*/
public function setCount($count);
/**
* Returns the url.
*
* @return \Drupal\Core\Url
* The url of the search page with the facet url appended.
*/
public function getUrl();
/**
* Sets the url.
*
* @param \Drupal\Core\Url $url
* The url of the search page with the facet url appended.
*/
public function setUrl(Url $url);
/**
* Indicates that the value is active (selected).
*
* @param bool $active
* A boolean indicating the active state.
*/
public function setActiveState($active);
/**
* Returns true if the value is active (selected).
*
* @return bool
* A boolean indicating the active state.
*/
public function isActive();
/**
* Returns true if the value has active children(selected).
*
* @return bool
* A boolean indicating the active state of children.
*/
public function hasActiveChildren();
/**
* Overrides the display value of a result.
*
* @param string $display_value
* Override display value.
*/
public function setDisplayValue($display_value);
/**
* Sets children results.
*
* @param \Drupal\facets\Result\ResultInterface[] $children
* The children to be added.
*/
public function setChildren(array $children);
/**
* Returns children results.
*
* @return \Drupal\facets\Result\ResultInterface[]
* The children results.
*/
public function getChildren();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ResultInterface:: |
public | function | Returns children results. | 1 |
ResultInterface:: |
public | function | Returns the count for the result. | 1 |
ResultInterface:: |
public | function | Returns the display value as present in the index. | 1 |
ResultInterface:: |
public | function | Returns the facet related to the result. | 1 |
ResultInterface:: |
public | function | Returns the raw value as present in the index. | 1 |
ResultInterface:: |
public | function | Returns the url. | 1 |
ResultInterface:: |
public | function | Returns true if the value has active children(selected). | 1 |
ResultInterface:: |
public | function | Returns true if the value is active (selected). | 1 |
ResultInterface:: |
public | function | Indicates that the value is active (selected). | 1 |
ResultInterface:: |
public | function | Sets children results. | 1 |
ResultInterface:: |
public | function | Sets the count for the result. | 1 |
ResultInterface:: |
public | function | Overrides the display value of a result. | 1 |
ResultInterface:: |
public | function | Sets the url. | 1 |