Beispiel #1
0
function addTopicTag($topic_id, $reference_string, $bible_code = 'kjv', $relevant_words = '')
{
    # Add tag object
    $tag_object = addTag($reference_string, $bible_code, $relevant_words);
    # Add topic tag object (if applicable)
    if ($tag_object) {
        $topic_tag_object = new TopicTag();
        $topic_tag_object->setTopicId($topic_id)->setTag($tag_object)->save();
    }
}
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTopicTags()
 {
     return $this->hasMany(TopicTag::className(), ['tag_id' => 'id']);
 }