public function SocialApi::setToken in Social API 3.x
Same name and namespace in other branches
- 8.2 src/Entity/SocialApi.php \Drupal\social_api\Entity\SocialApi::setToken()
Sets the encrypted, serialized token.
Parameters
string $token: The serialized access token.
Return value
\Drupal\social_auth\Entity\SocialApi Drupal Social Auth Entity.
File
- src/
Entity/ SocialApi.php, line 45
Class
- SocialApi
- Defines a base class for Social API content entities.
Namespace
Drupal\social_api\EntityCode
public function setToken($token) {
$this
->set('token', $this
->encryptToken($token));
return $this;
}