public function add_relationship($instance, $property = 'fields') {
    $this->__belongs_to = array('property' => $property, 'instance' => $instance);

    // Add relationship to all individual fields as well.
    foreach ($this as $item) {
      if ($item->has_property($property)) {
        $item->add_relationship($instance, $property);
      }
    }
  }
public function add_relationship($instance, $property = 'fields') {
    $this->__belongs_to = array('property' => $property, 'instance' => $instance);

    // Add relationship to all individual fields as well.
    foreach ($this as $item) {
      if ($item->has_property($property)) {
        $item->add_relationship($instance, $property);
      }
    }
  }
public function add_relationship ( $ instance , $ property = 'fields' ) { $ this -> __belongs_to = array ( 'property' => $ property , 'instance' => $ instance ) ; // Add relationship to all individual fields as well. foreach ( $ this as $ item ) { if ( $ item -> has_property ( $ property ) ) { $ item -> add_relationship ( $ instance , $ property ) ; } } }
Add a new relationship to a parent object. Will also add relationship
to all individual objects in the collection.
Add a new relationship to a parent object . Will also add relationship to all individual objects in the collection .