/** * Gets a list of related items given constraints * * @param ModelConfig $config * * @return array of objects [{id: string} ... {1: 'name'}, ...] */ public function action_update_options($config) { //get the constraints, the search term, and the currently-selected items $constraints = Input::get('constraints', array()); $term = Input::get('term', ''); $type = Input::get('type', false); $field = Input::get('field', false); $selectedItems = Input::get('selectedItems', false); //return the rows return Response::json(ModelHelper::updateRelationshipOptions($config, $field, $type, $constraints, $selectedItems, $term)); }