You are here

private function EntityReferenceReferenceRemain::changeInstanceSettings in Entityreference prepopulate 7

Change the settings of the instance.

1 call to EntityReferenceReferenceRemain::changeInstanceSettings()
EntityReferenceReferenceRemain::testScenarioReference in ./entityreference_prepopulate.test
Set various settings of the entity reference prepopulate settings.

File

./entityreference_prepopulate.test, line 225

Class

EntityReferenceReferenceRemain

Code

private function changeInstanceSettings($settings) {
  $instance = field_info_instance('node', 'node_ref', $this->node1->type);
  $old_settings = $instance['settings']['behaviors']['prepopulate'];
  $instance['settings']['behaviors']['prepopulate'] = $settings + $old_settings;
  field_update_instance($instance);
}