public function syncRelationships(array $relationships)
    {
        foreach ($relationships as $relation) {
            if (in_array($relation, $this->needSync)) {
                $this->synchronize($relation);
            }
        }
    }
public function syncRelationships(array $relationships)
    {
        foreach ($relationships as $relation) {
            if (in_array($relation, $this->needSync)) {
                $this->synchronize($relation);
            }
        }
    }
public function syncRelationships ( array $ relationships ) { foreach ( $ relationships as $ relation ) { if ( in_array ( $ relation , $ this -> needSync ) ) { $ this -> synchronize ( $ relation ) ; } } }
Synchronize relationships if needed.

@param array

@return void
Synchronize relationships if needed .