Ingo Schommer
a108f67476
Merge pull request #922 from simonwelsh/rellist-presave
...
NEW: Allows setting of has_many and many_many relations before writing
2012-12-04 01:25:15 -08:00
Ingo Schommer
fa2057bcd9
Merge remote-tracking branch 'origin/3.0'
...
Conflicts:
search/FulltextSearchable.php
2012-11-30 14:25:06 +01:00
Ingo Schommer
3f67404a8a
Revert "BUGFIX: ArrayList now discards keys of the array passed in and keeps the numerically indexed array sequential."
...
This reverts commit b6017a7c90
.
It breaks SelectionGroup, and its most prominent usage,
the "add page" dialog.
2012-11-30 14:24:03 +01:00
Simon Welsh
bbc4443af7
NEW: Allows setting of has_many and many_many relations before writing
...
Adds a new wrapper list, UnsavedRelationList, that maintains the relations until
writing, where it is converted into the correct RelationList.
2012-11-28 09:37:08 +13:00
Ingo Schommer
c55c7c33f8
Merge branch '3.0'
...
Conflicts:
admin/code/CMSProfileController.php
composer.json
tests/model/DataObjectTest.php
2012-11-22 23:51:28 +01:00
Sean Harvey
a2bd378d46
Remove deprecated ArrayList::getRange(), use limit() instead
2012-11-16 14:35:05 +13:00
Andrew O'Neil
b6017a7c90
BUGFIX: ArrayList now discards keys of the array passed in and keeps the numerically indexed array sequential.
...
This fixes FirstLast and EvenOdd in templates, and makes ArrayList more consistent, as several methods already discarded the keys.
2012-11-16 09:39:01 +13:00
Justin Martin
26e5afc0c4
NEW: Add new method "each" to SS_List and core implementors thereof
2012-11-02 18:21:02 -07:00
Sam Minnee
1f7fc1f76a
FIX Remove instances of lines longer than 120c
...
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit. This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a
Method visibility according to coding conventions
2012-09-20 10:46:59 +02:00
Hamish Friedlander
1ed41b8d67
API Prep ArrayList for immutability in 3.1 per 7673
...
ArrayList had several methods that should act on a copy and return
that copy, but was instead mutating the existing list.
We cant change this behaviour in the 3.0 line for backwards compt.
reasons, but this makes the desired behavior the default, and
makes disabling the mutation in 3.1 easier
2012-07-20 14:55:44 +12:00
Will Rossiter
9938b64cf6
FEATURE: implement SS_Sortable->reverse()
...
API CHANGE: SQLQuery:: now an array object rather than string. Existing strings will continue to work
2012-04-27 15:54:14 +12:00
Simon Welsh
f07258f3cf
MINOR Update @package values to match renaming sapphire
2012-04-15 10:50:19 +12:00
Simon Welsh
f8082e4814
MINOR Add newline to end of files without one
2012-04-15 10:50:19 +12:00
Andrew O'Neil
de2832e65f
ENHANCEMENT: Allow Object::create() to be called with late static binding.
...
This allows DataList::create('SiteTree') as equivalent to Object::create('DataList', 'SiteTree'), without
having to have a create() function on DataList. Required for E_STRICT compliance.
2012-03-27 17:57:42 +13:00
Sam Minnee
e9e7655867
API CHANGE: Added SS_Sortable, an extra interface to apply to SS_Lists.
2012-03-09 17:07:41 +13:00
Sam Minnee
f000a47813
API CHANGE: Added SS_Filterable, an extra interface to apply to lists.
2012-03-09 17:07:40 +13:00
Sam Minnee
a55e06f6b5
API CHANGE: Introduce SS_Limitable class for adding to SS_Lists that have limit capability.
...
API CHANGE: Deprecated SS_List::getRange() in favour of SS_Limitable::limit().
API CHANGE: Introduce SS_Limitable::limit($limit, $offset = 0) as the only modern way of specifying limits; deprecate all others.
2012-03-09 17:07:40 +13:00
Sam Minnee
3c1d62acfd
API CHANGE: Added ArrayList::dataClass(), which will return the class of the first item in the list.
2012-01-10 16:58:49 +13:00
Sam Minnee
93eb2dda54
API CHANGE: Added ArrayList::byID(), to improve its compatibility with DataList.
2012-01-09 18:47:59 +13:00
Stig Lindqvist
aafdb8e01c
API CHANGE All SS_List implementators supports filter, exclude and sort methods
2011-12-17 16:42:29 +13:00
Stig Lindqvist
2306ec94c3
MINOR Updated inline documentation and added visibility keywords to methods for SS_List, DataList and ArrayList
2011-12-17 16:42:29 +13:00
Sean Harvey
30f049bd26
ENHANCEMENT ArrayList and DataList now show a nice view of the items inside when using Debug::show()
2011-12-17 12:45:45 +13:00
Stig Lindqvist
fb8ff50451
API CHANGE Childclasses to SS_List matches the same signature on abstract methods column and map.
...
This was failing under php 5.2
2011-10-22 16:08:51 +02:00
Stig Lindqvist
bf73265252
BUGFIX Added Fixing deprecated usage of array_multisort for php 5.3
...
It worked by accident in php 5.2, see https://bugs.php.net/bug.php?id=49241
2011-09-27 11:12:35 +13:00
ajshort
c954ae5aaa
MINOR: Renamed ArrayList->array to ArrayList->items;
2011-05-06 00:30:45 +10:00
ajshort
b3fc458101
ENHANCEMENT: Made it possible to sort by multiple fields in ArrayList::sort().
2011-05-06 00:24:33 +10:00
ajshort
462689a4e6
ENHANCEMENT: Added ArrayList->removeDuplicates().
2011-05-05 20:53:07 +10:00
ajshort
99a2baf3f8
MINOR: Updated ArrayList->getRange() to return an ArrayList instance.
2011-05-05 20:41:06 +10:00
ajshort
2a3fdd16a4
MINOR: Added a default "ID" parameter to ArrayList->column().
2011-05-05 20:40:51 +10:00
ajshort
9f87294427
ENHANCEMENT: Added exists(), replace(), merge(), push(), pop(), unshift() and shift() methods to ArrayList.
2011-05-05 17:48:12 +10:00
ajshort
7e7677bbba
FEATURE: Added ArrayList to allow an array of arrays or objects to be handled as a list.
2011-05-04 00:06:42 +10:00