public function TweetEntity::setHashtags in Tweet Feed 4.x
Same name and namespace in other branches
- 8.3 src/Entity/TweetEntity.php \Drupal\tweet_feed\Entity\TweetEntity::setHashtags()
File
- src/
Entity/ TweetEntity.php, line 314
Class
- TweetEntity
- Defines the Tweet Feed Tweet entity.
Namespace
Drupal\tweet_feed\EntityCode
public function setHashtags($hashtags) {
$tags = [];
foreach ($hashtags as $hashtag) {
$tags[]['target_id'] = $hashtag;
}
$this
->set('hashtags', $tags);
return $this;
}