How to append to a CakePHP3 ResultSet?
问题 I have a query (a Query object): $joblineitems = $this->JobLineItems->find('all'); It has results (a ResultSet object): $joblineitemsresults = $joblineitems->all(); The ResultSet object is an Iterable such that a foreach() loop will return each of the JobLineItem objects. I simply want to add an additional result to $joblineitemsresults - specifically I want to append a $this->JobLineItems->newEntity() to the end of the results so that when I subsequently paginate $joblineitemsresults and