public function addMentionsFromBody()
    {
        $entity = $this->getItem();
        $usernames = $this->extractMentions($entity->body);

        foreach ($usernames as $username) {
            $entity->addMention(trim($username));
        }

        $this->_newly_mentioned = $usernames;
    }
public function addMentionsFromBody()
    {
        $entity = $this->getItem();
        $usernames = $this->extractMentions($entity->body);

        foreach ($usernames as $username) {
            $entity->addMention(trim($username));
        }

        $this->_newly_mentioned = $usernames;
    }
public function addMentionsFromBody ( ) { $ entity = $ this -> getItem ( ) ; $ usernames = $ this -> extractMentions ( $ entity -> body ) ; foreach ( $ usernames as $ username ) { $ entity -> addMention ( trim ( $ username ) ) ; } $ this -> _newly_mentioned = $ usernames ; }
Extracts mention usernames from the entity body and add them to the item.
Extracts mention usernames from the entity body and add them to the item .