App\Models\Forum\TopicPoll::setTopic PHP Метод

setTopic() публичный Метод

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

Usage Example

Пример #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;
 }