/** * Use the remove query to remove all items from the collection * @param Jam_Validated $model * @param Jam_Array_Association $collection */ public function clear(Jam_Validated $model, Jam_Array_Association $collection) { if ($ids = array_filter($collection->ids())) { $query = $this->remove_items_query($model, $ids); if ($query) { $query->execute(Jam::meta($this->model)->db()); } } }