Skip to content

Instantly share code, notes, and snippets.

@siran
Last active May 13, 2017
Embed
What would you like to do?
working with collections
<?php
$list = $this->Transacciones->find()
->distinct(...)
->select(...)
->contain(...)
->order(...)
->reject(...)
->sortBy(...);
//debug($list);
//LIST IS OK!
$sublist = array_values($lista_orden_id->extract('entidad_id')->toArray());
//debug($sublist);
//LIST IS **NOT** OK: I get values that were already rejected in $list
//question: How can I obtain a $sublist by manipulating $list without resetting the values to the original query?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment