Commit Graph

6542 Commits

Author SHA1 Message Date
ajshort
43c39bed8f MINOR: Updated RestfulServer to properly convert list instances. 2011-05-03 13:11:09 +10:00
ajshort
c025ce7a4a MINOR: Replaced usage of deprecated toDropdownMap() with map(). 2011-05-03 13:05:27 +10:00
ajshort
14c57ae082 MINOR: Updated TableListField to accept any list type, not just a DataObjectSet. 2011-05-03 12:22:18 +10:00
ajshort
04e30243d0 MINOR: Updated MemberTest to work with a standard array iterator. 2011-05-03 12:16:40 +10:00
ajshort
26faead3e5 MINOR: Made DataObjectSet implement the SS_List interface. 2011-05-03 12:16:15 +10:00
ajshort
b872ad7bb8 MINOR: Added default parameters to DataList->map(). 2011-05-03 12:15:49 +10:00
ajshort
50506659d1 API ChANGE: Updated DataList to not extend from DataObjectSet, but instead implement the list iterator.
MINOR: Return an ArrayIterator from DataList rather than a DataObjectSet_Iterator.
2011-05-02 18:14:55 +10:00
ajshort
df87fd5a11 API CHANGE: Updated SS_ListDecorator to implement the list inteface and extend ViewableData, rather than DataObjectSet. 2011-05-02 18:12:39 +10:00
ajshort
04e5dae22e MINOR: Updated places that expect a DataObjectSet to accept an SS_List instance. 2011-05-02 17:14:05 +10:00
ajshort
a940fb2888 FEATURE: Added the SS_List interface which classes can implement to be recognised as a list. 2011-05-02 13:38:40 +10:00
Sam Minnee
7fbb919ce8 API CHANGE: Introduce DataModel object, as a representation of the project's entire data model, and tie it to $this->model an all DataObjects, Controllers, and RequestHandlers for easy non-static access.
API CHANGE: Add DataList::newObject(), which creates a new object on that DataList.
API CHANGE: RequestHandler::handleRequest() now needs to handle a $model argument, if you override it.
2011-05-01 17:33:02 +12:00
Sam Minnee
2f79961988 MINOR: Moved tests for DataList into DataListTest. 2011-05-01 17:12:50 +12:00
Sam Minnee
a15b6941a6 BUGFIX: Replaced ManifestBuilder::has_been_included() with SS_ClassLoader::hasManifest(). 2011-05-01 17:12:26 +12:00
ajshort
2365bfc652 MINOR: Moved model tests into the tests/model directory. 2011-05-01 15:26:30 +12:00
ajshort
34e9ddfcc3 MINOR: Moved files from /core/model into /model. 2011-05-01 15:26:30 +12:00
ajshort
81c0caaddb API CHANGE: Renamed DataList::filter() and DataQuery::filter() to ::where(). 2011-05-01 15:26:30 +12:00
ajshort
8ec412e4d9 MINOR: Updated PaginatedList to be a list decorator. 2011-05-01 15:26:30 +12:00
ajshort
8fb7b531cf MINOR: Updated MySQLDatabase::searchEngine() to use the new PaginatedList API. 2011-05-01 15:26:30 +12:00
ajshort
fc8d442505 MINOR: Removed useless setPageLimits call from ComplexTableField::Items(). 2011-05-01 15:26:29 +12:00
ajshort
45a8866fab FEATURE: Added SS_ListDecorator, which is a utility class used to create decorators which wrap around a list instance, but are stll recognised as a list. 2011-05-01 15:26:29 +12:00
ajshort
ff3d3816ca MINOR: Updated SapphireTest::dataObjectArrayMatch() to use array_key_exists() rather than isset(). This allows tempting for NULL values in DOS assertion methods. 2011-05-01 15:26:29 +12:00
ajshort
3fbb29a6c5 FEATURE: Added PaginatedList, which wraps around a data list or set to provide pagination functionality. This replaces the pagination functionality baked into DataObjectSet.
API CHANGE: Removed pagination related methods from DataObjectSet and implemented them on PaginatedList.
API CHANGE: Removed DataObjectSet::parseQueryLimit(), this is now implemented as PaginatedList::setPaginationFromQuery().
API CHANGE: Deprecated DataObjectSet::TotalItems in favour of Count().
ENHANCEMENT: Added FirstLink and LastLink to PaginatedList.
MINOR: Updated documentation, and added a how-to on paginating items.
2011-05-01 15:26:29 +12:00
ajshort
79cde9df25 API CHANGE: Renamed ArrayData::getArray() to toMap() to make it consistent with DataObject. This also makes it work with SapphireTest assertation methods. 2011-05-01 15:26:29 +12:00
Sam Minnee
f5d2e43636 ENHANCEMENT: Added documentation for the new ORM. 2011-05-01 15:26:29 +12:00
Sam Minnee
6915e58a39 BUGFIX: Fix SQLQuery::queriedTables() and added test. 2011-05-01 15:26:29 +12:00
Sam Minnee
397d19f23b BUGFIX: Fixed bug in relation to new ORM(DataObject::get() doesn't return a null anymore) 2011-05-01 15:26:28 +12:00
Sam Minnee
0de6dbc848 BUGFIX: Fixed Permission::add_to_hidden_permissions() and Permission::remove_from_hidden_permissions() 2011-05-01 15:26:28 +12:00
Sam Minnee
7efd19e7cb BUGFIX: Fixed DataList arrayaccess. 2011-05-01 15:26:28 +12:00
Sam Minnee
8db236f444 BUGFIX: Fixed DataList::relation(). 2011-05-01 15:26:28 +12:00
Sam Minnee
25018180c5 BUGFIX: Edge-case handler for jquery.ondemand. NOTE - this is clumsy, it would be better to work out what's being passed as the xhr argument and why. 2011-05-01 15:26:28 +12:00
Sam Minnee
4a061fd071 ENHANCEMENT: Refactored MemberTableList field to make better use of DataList and ManyManyList. Refactored ComplexTableField and TableListField to, stripping out as much model logic as possible. 2011-05-01 15:26:28 +12:00
Sam Minnee
3a17d5c427 API CHANGE: Add removeByID(), canSortBy(), and byID() to DataList and its subclasses. 2011-05-01 15:26:01 +12:00
Sam Minnee
b8f736d665 ENHANCEMENT: Updated restfulserver to make use of refactored searchquery. note that searchquery will probably be bypasssed entirely in the near future. 2011-05-01 15:25:58 +12:00
Sam Minnee
c615c4eb91 ENHANCEMENT: First cut of running SearchContext through DataList/DataQuery. Note that the eventual goal is probably to ditch SearchContext entirely. 2011-05-01 15:25:58 +12:00
Sam Minnee
f83abe416c MINOR: Improved some exception handling. 2011-05-01 15:25:58 +12:00
Sam Minnee
0ba86971e2 API CHANGE: Removed context object - it's a hack. 2011-05-01 15:25:58 +12:00
Sam Minnee
c57378753d ENHANCEMENT: Improved Versioned to pass different query styles as DataQuery modes. 2011-05-01 15:25:46 +12:00
Sam Minnee
319d2f4952 ENHANCEMENT: Refactored TableListField and subclasses to rely on the DataList to handle data manipulatation.
API CHANGE: A DataList can be passed as the 2nd argument to the constructor; this is the recommended approach for editing non-relations.
API CHANGE: You can't set a custom query; only a custom DataList.
API CHANGE: You can't have one of these fields editing data that doesn't correspond to a DataList - there must be some kind of DataObject behind it.
API CHANGE: If the field's name corresponds to a relation on the object being edited, then the relation is used as the data set - all the source* parameters are ignored.
API CHANGE: relationAutoSetting only works if your form has had the corresponding data object loaded with $form->loadDataFrom().
API CHANGE: relationAutoSetting can't be turned off; attach a non-relation DataList instead.
2011-05-01 15:25:45 +12:00
Sam Minnee
165f38361b BUGFIX: Updated Hierarchy::liveChildren() to use DataList over buildDataObjectSet. 2011-05-01 15:25:45 +12:00
Sam Minnee
33fa7825f9 BUGFIX: Updated Member <-> Group relations to work with new ManyManyList. API CHANGE: Deprecated the special methods in Member_GroupSet. 2011-05-01 15:25:45 +12:00
Sam Minnee
050e0675ce ENHANCEMENT: Created HasManyList and ManyManyList objects that represent relations. API CHANGE: Relation methods no longer cache their results. API CHANGE: ComponentSet is deprecated. API CHANGE: DataObject::getManyManyComponentsQuery() no longer exists; just use the ManyManyList itself. API CHANGE: DataObject::getManyManyJoin() no longer exists; just use the ManyManyList itself. API CHANGE: DataObject::getManyManyFilter() no longer exists; just use the ManyManyList itself. 2011-05-01 15:25:45 +12:00
Sam Minnee
de1494e3a8 ENHANCEMENT: Implemented DataList as the successor of DataObjectSet. DataList doesn't execute the query until it's actually needed, allowing for a more flexible ORM.
API CHANGE: augmentSQL is now passed a DataQuery object from which query parameters can be extracted.
API CHANGE: DataObjectDecorators that manipulate the query can now define augmentDataQueryCreation().
API CHANGE: The container class argument for DataObject::get() is deprecated.
API CHANGE: DataObject::buildSQL() and DataObject::extendedSQL() are deprecated; just use DataObject::get() now.
API CHANGE: DataObject::instance_get() and DataObject::instance_get_one() are deprecated, and can no longer be overloaded.
API CHANGE: DataObject::buildDataObjectSet() is deprecated.
API CHANGE: Cant't call manual manipulation methods on DataList such as insertFirst()
2011-05-01 15:25:45 +12:00
Sam Minnee
2b991629b8 API CHANGE: In FieldSet::removeByName(), only match on field Title() if field Name() isn't set. 2011-05-01 15:25:14 +12:00
Sam Minnee
5dd03ca9fb MINOR: Added additional tests for the ORM. 2011-05-01 15:25:14 +12:00
Sam Minnee
7fab93f7cb API CHANGE: Added SQLQuery::count(), SQLQuery::firstRow(), and SQLQuery::lastRow() 2011-05-01 15:25:14 +12:00
Sam Minnee
8a9903988f MINOR: Always store SQLQuery::$limit as a 2-element array internally. 2011-05-01 15:25:14 +12:00
Sam Minnee
199e267bbf MINOR: Don't add 'OFFSET 0' to a query unnecessarily. 2011-05-01 15:25:14 +12:00
Sam Minnee
3619eae9eb MINOR: Don't couple GroupTest to the Member_GroupSet object. 2011-05-01 15:25:14 +12:00
Ingo Schommer
79e0634537 Merge branch 'cms-ui-preparation' 2011-04-28 22:48:02 +12:00
Ingo Schommer
0fd6924fe1 FEATURE Preview changes of page edits in CMS on website (through <iframe> sidebar) 2011-04-28 22:36:28 +12:00