public function RecentlyReadServiceInterface::insertEntity in Recently Read 8
Custom function to insert or update an entry for recently read.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The viewed entity.
\Drupal\Core\Session\AccountInterface|null $user: The user who read the entity. If NULL then the current user will be used.
1 method overrides RecentlyReadServiceInterface::insertEntity()
- RecentlyReadService::insertEntity in src/
RecentlyReadService.php - Custom function to insert or update an entry for recently read.
File
- src/
RecentlyReadServiceInterface.php, line 23
Class
- RecentlyReadServiceInterface
- Interface RecentlyReadServiceInterface.
Namespace
Drupal\recently_readCode
public function insertEntity(EntityInterface $entity, AccountInterface $user = NULL);