Created
June 18, 2014 04:32
-
-
Save adrexia/12c309a197a79e54718d to your computer and use it in GitHub Desktop.
Silverstripe - Manually add Many Many Relations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function setManyManyRelation($relationFieldList){ | |
if(!$relationFieldList){ | |
return false; | |
} | |
foreach($relationFieldList as $relation){ | |
$this->ManyManyRelation()->add($relation); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment