App\Models\Forum\TopicPoll::setTopic PHP Method

setTopic() public method

public setTopic ( $topic )
    public function setTopic($topic)
    {
        $this->topic = $topic;
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 public function poll($poll = null)
 {
     if ($this->_poll === null) {
         if ($poll === null) {
             $poll = new TopicPoll();
         }
         $this->_poll = $poll->setTopic($this);
     }
     return $this->_poll;
 }