Beispiel #1
0
 /**
  * Sets up the Relation definitions on this record object.
  *
  * @since 2.0
  */
 protected function setupRels()
 {
     $this->comments->setValue($this->OID);
     $this->comments->setRelatedClass('Alpha\\Model\\ArticleComment');
     $this->comments->setRelatedClassField('articleOID');
     $this->comments->setRelatedClassDisplayField('content');
     $this->comments->setRelationType('ONE-TO-MANY');
     $this->votes->setValue($this->OID);
     $this->votes->setRelatedClass('Alpha\\Model\\ArticleVote');
     $this->votes->setRelatedClassField('articleOID');
     $this->votes->setRelatedClassDisplayField('score');
     $this->votes->setRelationType('ONE-TO-MANY');
     $this->tags->setRelatedClass('Alpha\\Model\\Tag');
     $this->tags->setRelatedClassField('taggedOID');
     $this->tags->setRelatedClassDisplayField('content');
     $this->tags->setRelationType('ONE-TO-MANY');
     $this->tags->setTaggedClass(get_class($this));
     $this->tags->setValue($this->OID);
 }