protected function PathautoState::getOriginalValue in Pathauto 8
Gets the data value currently stored in database.
Return value
mixed The data value.
2 calls to PathautoState::getOriginalValue()
- PathautoState::getValue in src/
PathautoState.php - Gets the data value.
- PathautoState::persist in src/
PathautoState.php - Persists the state.
File
- src/
PathautoState.php, line 66
Class
- PathautoState
- A property that stores in keyvalue whether an entity should receive an alias.
Namespace
Drupal\pathautoCode
protected function getOriginalValue() {
if ($this->originalValue === NULL) {
// If no value has been set or loaded yet, try to load a value if this
// entity has already been saved.
$this->originalValue = \Drupal::keyValue($this
->getCollection())
->get(static::getPathautoStateKey($this->parent
->getEntity()
->id()));
}
return $this->originalValue;
}