hasOnlyOneTopic() public method

Check if only one topic was set
public hasOnlyOneTopic ( ) : boolean
return boolean
Example #1
0
 /**
  * get Options transformed
  *
  * @return array
  */
 protected function getOptions()
 {
     $options = $this->options ? $this->options->toArray() : [];
     if ($this->topic && !$this->topic->hasOnlyOneTopic()) {
         $options = array_merge($options, $this->topic->build());
     }
     return $options;
 }