public function TxBuffer::getByProperty in Purge 8.3
Retrieve a buffered object by property=value combination.
Parameters
string $property: The name of the property you want to look for.
mixed $value: The (unique) value of the property that has to be stored in the buffer in order to return the object.
Return value
\Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface|false The matched invalidation object or FALSE when there was no combination found of the property and value.
Overrides TxBufferInterface::getByProperty
File
- src/
Plugin/ Purge/ Queue/ TxBuffer.php, line 78
Class
- TxBuffer
- Provides the transaction buffer.
Namespace
Drupal\purge\Plugin\Purge\QueueCode
public function getByProperty($property, $value) {
foreach ($this->properties as $id => $properties) {
if (isset($properties[$property])) {
if ($properties[$property] === $value) {
return $this->instances[$id];
}
}
}
return FALSE;
}