public function setRelation($contentType, $id)
    {
        if (empty($this->relation[$contentType]) || !in_array($id, $this->relation[$contentType], false)) {
            $this->relation[$contentType][] = $id;
        }
    }
public function setRelation($contentType, $id)
    {
        if (empty($this->relation[$contentType]) || !in_array($id, $this->relation[$contentType], false)) {
            $this->relation[$contentType][] = $id;
        }
    }
public function setRelation ( $ contentType , $ id ) { if ( empty ( $ this -> relation [ $ contentType ] ) || ! in_array ( $ id , $ this -> relation [ $ contentType ] , false ) ) { $ this -> relation [ $ contentType ] [ ] = $ id ; } }
Add a relation.

@param string|array $contentType
@param int          $id
Add a relation .