public function SavedSearch::setOwner in Search API Saved Searches 8
Sets the entity owner's user entity.
Parameters
\Drupal\user\UserInterface $account: The owner user entity.
Return value
$this
Overrides EntityOwnerInterface::setOwner
File
- src/
Entity/ SavedSearch.php, line 485
Class
- SavedSearch
- Provides an entity type for saved searches.
Namespace
Drupal\search_api_saved_searches\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('uid', $account
->id());
return $this;
}