mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Fix docblocks to reference SS_List instead of (now deprecated) DataObjectSet where appropriate
This commit is contained in:
parent
0a3e0f15de
commit
e38dd08ea5
@ -32,7 +32,7 @@ abstract class CMSBatchAction extends Object {
|
||||
* Helper method for processing batch actions.
|
||||
* Returns a set of status-updating JavaScript to return to the CMS.
|
||||
*
|
||||
* @param $objs The DataObjectSet of objects to perform this batch action
|
||||
* @param $objs The SS_List of objects to perform this batch action
|
||||
* on.
|
||||
* @param $helperMethod The method to call on each of those objects.
|
||||
* @return JSON encoded map in the following format:
|
||||
|
@ -166,7 +166,7 @@ class CMSBatchActionHandler extends RequestHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a DataObjectSet of ArrayData objects containing the following pieces of info
|
||||
* Return a SS_List of ArrayData objects containing the following pieces of info
|
||||
* about each batch action:
|
||||
* - Link
|
||||
* - Title
|
||||
|
@ -393,7 +393,7 @@ class LeftAndMain extends Controller {
|
||||
* Returns the main menu of the CMS. This is also used by init()
|
||||
* to work out which sections the user has access to.
|
||||
*
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function MainMenu() {
|
||||
// Don't accidentally return a menu if you're not logged in - it's used to determine access.
|
||||
|
@ -54,7 +54,7 @@ class MemberTableField extends ComplexTableField {
|
||||
* @param Controller $controller Controller class which created this field
|
||||
* @param string $name Name of the field (e.g. "Members")
|
||||
* @param mixed $group Can be the ID of a Group instance, or a Group instance itself
|
||||
* @param DataObjectSet $members Optional set of Members to set as the source items for this field
|
||||
* @param SS_List $members Optional set of Members to set as the source items for this field
|
||||
* @param boolean $hidePassword Hide the password field or not in the summary?
|
||||
*/
|
||||
function __construct($controller, $name, $group = null, $members = null, $hidePassword = true) {
|
||||
|
@ -244,7 +244,7 @@ abstract class ModelAdmin extends LeftAndMain {
|
||||
* Returns managed models' create, search, and import forms
|
||||
* @uses SearchContext
|
||||
* @uses SearchFilter
|
||||
* @return DataObjectSet of forms
|
||||
* @return SS_List of forms
|
||||
*/
|
||||
protected function getModelForms() {
|
||||
$models = $this->getManagedModels();
|
||||
|
@ -116,9 +116,9 @@ class JSONDataFormatter extends DataFormatter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a JSON representation of the given {@link DataObjectSet}.
|
||||
* Generate a JSON representation of the given {@link SS_List}.
|
||||
*
|
||||
* @param DataObjectSet $set
|
||||
* @param SS_List $set
|
||||
* @return String XML
|
||||
*/
|
||||
public function convertDataObjectSet(SS_List $set, $fields = null) {
|
||||
|
@ -20,7 +20,7 @@ class RSSFeed extends ViewableData {
|
||||
/**
|
||||
* Holds the feed entries
|
||||
*
|
||||
* @var DataObjectSet
|
||||
* @var SS_List
|
||||
*/
|
||||
protected $entries;
|
||||
|
||||
@ -83,7 +83,7 @@ class RSSFeed extends ViewableData {
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DataObjectSet $entries RSS feed entries
|
||||
* @param SS_List $entries RSS feed entries
|
||||
* @param string $link Link to the feed
|
||||
* @param string $title Title of the feed
|
||||
* @param string $description Description of the field
|
||||
@ -134,7 +134,7 @@ class RSSFeed extends ViewableData {
|
||||
/**
|
||||
* Get the RSS feed entries
|
||||
*
|
||||
* @return DataObjectSet Returns the {@link RSSFeed_Entry} objects.
|
||||
* @return SS_List Returns the {@link RSSFeed_Entry} objects.
|
||||
*/
|
||||
function Entries() {
|
||||
$output = new ArrayList();
|
||||
|
@ -217,7 +217,7 @@ class RestfulServer extends Controller {
|
||||
$responseFormatter = $this->getResponseDataFormatter();
|
||||
if(!$responseFormatter) return $this->unsupportedMediaType();
|
||||
|
||||
// $obj can be either a DataObject or a DataObjectSet,
|
||||
// $obj can be either a DataObject or a SS_List,
|
||||
// depending on the request
|
||||
if($id) {
|
||||
// Format: /api/v1/<MyClass>/<ID>
|
||||
@ -262,7 +262,7 @@ class RestfulServer extends Controller {
|
||||
*
|
||||
* @param string $className
|
||||
* @param array $params
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
protected function getSearchQuery($className, $params = null, $sort = null, $limit = null, $existingQuery = null) {
|
||||
if(singleton($className)->hasMethod('getRestfulSearchContext')) {
|
||||
@ -592,7 +592,7 @@ class RestfulServer extends Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Restful server handler for a DataObjectSet
|
||||
* Restful server handler for a SS_List
|
||||
*
|
||||
* @package sapphire
|
||||
* @subpackage api
|
||||
@ -630,7 +630,7 @@ class RestfulServer_Item {
|
||||
$funcName = $request('Relation');
|
||||
$relation = $this->item->$funcName();
|
||||
|
||||
if($relation instanceof DataObjectSet) return new RestfulServer_List($relation);
|
||||
if($relation instanceof SS_List) return new RestfulServer_List($relation);
|
||||
else return new RestfulServer_Item($relation);
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class SapphireSoapServer extends Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DataObjectSet Collection of ArrayData elements describing
|
||||
* @return SS_List Collection of ArrayData elements describing
|
||||
* the method (keys: 'Name', 'Arguments', 'ReturnType')
|
||||
*/
|
||||
function Methods() {
|
||||
|
@ -127,9 +127,9 @@ class XMLDataFormatter extends DataFormatter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an XML representation of the given {@link DataObjectSet}.
|
||||
* Generate an XML representation of the given {@link SS_List}.
|
||||
*
|
||||
* @param DataObjectSet $set
|
||||
* @param SS_List $set
|
||||
* @return String XML
|
||||
*/
|
||||
public function convertDataObjectSet(SS_List $set, $fields = null) {
|
||||
|
@ -162,7 +162,7 @@ class PaginatedList extends SS_ListDecorator {
|
||||
* around the current page.
|
||||
*
|
||||
* @param int $max
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function Pages($max = null) {
|
||||
$result = new ArrayList();
|
||||
@ -229,7 +229,7 @@ class PaginatedList extends SS_ListDecorator {
|
||||
* @param int $context The number of pages to display around the current
|
||||
* page. The number should be event, as half the number of each pages
|
||||
* are displayed on either side of the current one.
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function PaginationSummary($context = 4) {
|
||||
$result = new ArrayList();
|
||||
|
@ -326,24 +326,24 @@ class BulkLoader_Result extends Object {
|
||||
* Returns all created objects. Each object might
|
||||
* contain specific importer feedback in the "_BulkLoaderMessage" property.
|
||||
*
|
||||
* @return DataObjectSet
|
||||
* @return ArrayList
|
||||
*/
|
||||
public function Created() {
|
||||
return $this->mapToDataObjectSet($this->created);
|
||||
return $this->mapToArrayList($this->created);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DataObjectSet
|
||||
* @return ArrayList
|
||||
*/
|
||||
public function Updated() {
|
||||
return $this->mapToDataObjectSet($this->updated);
|
||||
return $this->mapToArrayList($this->updated);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DataObjectSet
|
||||
* @return ArrayList
|
||||
*/
|
||||
public function Deleted() {
|
||||
return $this->mapToDataObjectSet($this->deleted);
|
||||
return $this->mapToArrayList($this->deleted);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -396,9 +396,9 @@ class BulkLoader_Result extends Object {
|
||||
|
||||
/**
|
||||
* @param $arr Array containing ID and ClassName maps
|
||||
* @return DataObjectSet
|
||||
* @return ArrayList
|
||||
*/
|
||||
protected function mapToDataObjectSet($arr) {
|
||||
protected function mapToArrayList($arr) {
|
||||
$set = new ArrayList();
|
||||
foreach($arr as $arrItem) {
|
||||
$obj = DataObject::get_by_id($arrItem['ClassName'], $arrItem['ID']);
|
||||
|
@ -513,12 +513,12 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
|
||||
/**
|
||||
* Assert that the given {@link DataObjectSet} includes DataObjects matching the given key-value
|
||||
* Assert that the given {@link SS_List} includes DataObjects matching the given key-value
|
||||
* pairs. Each match must correspond to 1 distinct record.
|
||||
*
|
||||
* @param $matches The patterns to match. Each pattern is a map of key-value pairs. You can
|
||||
* either pass a single pattern or an array of patterns.
|
||||
* @param $dataObjectSet The {@link DataObjectSet} to test.
|
||||
* @param $dataObjectSet The {@link SS_List} to test.
|
||||
*
|
||||
* Examples
|
||||
* --------
|
||||
@ -550,8 +550,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
||||
// We couldn't find a match - assertion failed
|
||||
if(!$matched) {
|
||||
throw new PHPUnit_Framework_AssertionFailedError(
|
||||
"Failed asserting that the DataObjectSet contains an item matching "
|
||||
. var_export($match, true) . "\n\nIn the following DataObjectSet:\n"
|
||||
"Failed asserting that the SS_List contains an item matching "
|
||||
. var_export($match, true) . "\n\nIn the following SS_List:\n"
|
||||
. $this->DOSSummaryForMatch($dataObjectSet, $match)
|
||||
);
|
||||
}
|
||||
@ -560,12 +560,12 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that the given {@link DataObjectSet} includes only DataObjects matching the given
|
||||
* Assert that the given {@link SS_List} includes only DataObjects matching the given
|
||||
* key-value pairs. Each match must correspond to 1 distinct record.
|
||||
*
|
||||
* @param $matches The patterns to match. Each pattern is a map of key-value pairs. You can
|
||||
* either pass a single pattern or an array of patterns.
|
||||
* @param $dataObjectSet The {@link DataObjectSet} to test.
|
||||
* @param $dataObjectSet The {@link SS_List} to test.
|
||||
*
|
||||
* Example
|
||||
* --------
|
||||
@ -596,8 +596,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
||||
// We couldn't find a match - assertion failed
|
||||
if(!$matched) {
|
||||
throw new PHPUnit_Framework_AssertionFailedError(
|
||||
"Failed asserting that the DataObjectSet contains an item matching "
|
||||
. var_export($match, true) . "\n\nIn the following DataObjectSet:\n"
|
||||
"Failed asserting that the SS_List contains an item matching "
|
||||
. var_export($match, true) . "\n\nIn the following SS_List:\n"
|
||||
. $this->DOSSummaryForMatch($dataObjectSet, $match)
|
||||
);
|
||||
}
|
||||
@ -607,18 +607,18 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
||||
if($extracted) {
|
||||
// If we didn't break by this point then we couldn't find a match
|
||||
throw new PHPUnit_Framework_AssertionFailedError(
|
||||
"Failed asserting that the DataObjectSet contained only the given items, the "
|
||||
"Failed asserting that the SS_List contained only the given items, the "
|
||||
. "following items were left over:\n" . var_export($extracted, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that the every record in the given {@link DataObjectSet} matches the given key-value
|
||||
* Assert that the every record in the given {@link SS_List} matches the given key-value
|
||||
* pairs.
|
||||
*
|
||||
* @param $match The pattern to match. The pattern is a map of key-value pairs.
|
||||
* @param $dataObjectSet The {@link DataObjectSet} to test.
|
||||
* @param $dataObjectSet The {@link SS_List} to test.
|
||||
*
|
||||
* Example
|
||||
* --------
|
||||
|
@ -25,7 +25,7 @@
|
||||
* * If the field name matches a database field, a comma-separated list of values will be saved to that field. The keys can be text or numbers.
|
||||
*
|
||||
* @todo Document the different source data that can be used
|
||||
* with this form field - e.g ComponentSet, DataObjectSet,
|
||||
* with this form field - e.g ComponentSet, ArrayList,
|
||||
* array. Is it also appropriate to accept so many different
|
||||
* types of data when just using an array would be appropriate?
|
||||
*
|
||||
@ -46,7 +46,7 @@ class CheckboxSetField extends OptionsetField {
|
||||
|
||||
/**
|
||||
* @todo Explain different source data that can be used with this field,
|
||||
* e.g. SQLMap, DataObjectSet or an array.
|
||||
* e.g. SQLMap, ArrayList or an array.
|
||||
*
|
||||
* @todo Should use CheckboxField FieldHolder rather than constructing own markup.
|
||||
*/
|
||||
@ -76,7 +76,7 @@ class CheckboxSetField extends OptionsetField {
|
||||
$items = $values;
|
||||
} else {
|
||||
// Source and values are DataObject sets.
|
||||
if($values && is_a($values, 'DataObjectSet')) {
|
||||
if($values && is_a($values, 'SS_List')) {
|
||||
foreach($values as $object) {
|
||||
if(is_a($object, 'DataObject')) {
|
||||
$items[] = $object->ID;
|
||||
@ -88,8 +88,8 @@ class CheckboxSetField extends OptionsetField {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Sometimes we pass a singluar default value thats ! an array && !DataObjectSet
|
||||
if(is_a($values, 'DataObjectSet') || is_array($values)) {
|
||||
// Sometimes we pass a singluar default value thats ! an array && !SS_List
|
||||
if(is_a($values, 'SS_List') || is_array($values)) {
|
||||
$items = $values;
|
||||
} else {
|
||||
$items = explode(',', $values);
|
||||
@ -247,7 +247,7 @@ class CheckboxSetField extends OptionsetField {
|
||||
|
||||
if($items) {
|
||||
// Items is a DO Set
|
||||
if(is_a($items, 'DataObjectSet')) {
|
||||
if(is_a($items, 'SS_List')) {
|
||||
foreach($items as $item) {
|
||||
$data[] = $item->Title;
|
||||
}
|
||||
@ -264,7 +264,7 @@ class CheckboxSetField extends OptionsetField {
|
||||
$data[] = $item['Title'];
|
||||
} elseif(is_array($this->source) && !empty($this->source[$item])) {
|
||||
$data[] = $this->source[$item];
|
||||
} elseif(is_a($this->source, 'DataObjectSet')) {
|
||||
} elseif(is_a($this->source, 'SS_List')) {
|
||||
$data[] = $sourceTitles[$item];
|
||||
} else {
|
||||
$data[] = $item;
|
||||
|
@ -245,7 +245,7 @@ JS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
function Items() {
|
||||
$sourceItems = $this->sourceItems();
|
||||
@ -709,7 +709,7 @@ class ComplexTableField_ItemRequest extends TableListField_ItemRequest {
|
||||
/**
|
||||
* Method handles pagination in asset popup.
|
||||
*
|
||||
* @return Object DataObjectSet
|
||||
* @return Object SS_List
|
||||
*/
|
||||
|
||||
function Pagination() {
|
||||
|
@ -116,7 +116,7 @@ class TableField extends TableListField {
|
||||
/**
|
||||
* Displays the headings on the template
|
||||
*
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
function Headings() {
|
||||
$i=0;
|
||||
@ -147,7 +147,7 @@ class TableField extends TableListField {
|
||||
* it generates the rows from array data instead.
|
||||
* Used in the formfield template to iterate over each row.
|
||||
*
|
||||
* @return DataObjectSet Collection of {@link TableField_Item}
|
||||
* @return SS_List Collection of {@link TableField_Item}
|
||||
*/
|
||||
function Items() {
|
||||
// holds TableField_Item instances
|
||||
@ -341,7 +341,7 @@ class TableField extends TableListField {
|
||||
* Called on save, it creates the appropriate objects and writes them
|
||||
* to the database.
|
||||
*
|
||||
* @param DataObjectSet $dataObjects
|
||||
* @param SS_List $dataObjects
|
||||
* @param boolean $existingValues If set to TRUE, it tries to find existing objects
|
||||
* based on the database IDs passed as array keys in $dataObjects parameter.
|
||||
* If set to FALSE, it will always create new object (default: TRUE)
|
||||
|
@ -266,7 +266,7 @@ class TableListField extends FormField {
|
||||
function sourceClass() {
|
||||
$list = $this->getDataList();
|
||||
if(method_exists($list, 'dataClass')) return $list->dataClass();
|
||||
// Failover for DataObjectSet
|
||||
// Failover for SS_List
|
||||
else return get_class($list->First());
|
||||
}
|
||||
|
||||
@ -364,7 +364,7 @@ JS
|
||||
* Dummy function to get number of actions originally generated in
|
||||
* TableListField_Item.
|
||||
*
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
function Actions() {
|
||||
$allowedActions = new ArrayList();
|
||||
@ -396,10 +396,10 @@ JS
|
||||
user_error('TableList::setCustomSourceItems() deprecated, just pass the items into the constructor', E_USER_WARNING);
|
||||
|
||||
// The type-hinting above doesn't seem to work consistently
|
||||
if($items instanceof DataObjectSet) {
|
||||
if($items instanceof SS_List) {
|
||||
$this->dataList = $items;
|
||||
} else {
|
||||
user_error('TableList::setCustomSourceItems() should be passed a DataObjectSet', E_USER_WARNING);
|
||||
user_error('TableList::setCustomSourceItems() should be passed a SS_List', E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
@ -407,10 +407,10 @@ JS
|
||||
* Get items, with sort & limit applied
|
||||
*/
|
||||
function sourceItems() {
|
||||
// get items (this may actually be a DataObjectSet)
|
||||
// get items (this may actually be a SS_List)
|
||||
$items = clone $this->getDataList();
|
||||
|
||||
// TODO: Sorting could be implemented on regular DataObjectSets.
|
||||
// TODO: Sorting could be implemented on regular SS_Lists.
|
||||
if(method_exists($items,'canSortBy') && isset($_REQUEST['ctf'][$this->Name()]['sort'])) {
|
||||
$sort = $_REQUEST['ctf'][$this->Name()]['sort'];
|
||||
// TODO: sort direction
|
||||
@ -434,7 +434,7 @@ JS
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a DataObjectSet of TableListField_Item objects, suitable for display in the template.
|
||||
* Return a SS_List of TableListField_Item objects, suitable for display in the template.
|
||||
*/
|
||||
function Items() {
|
||||
$fieldItems = new ArrayList();
|
||||
@ -586,7 +586,7 @@ JS
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DataObjectSet $items Only used to pass grouped sourceItems for creating
|
||||
* @param SS_List $items Only used to pass grouped sourceItems for creating
|
||||
* partial summaries.
|
||||
*/
|
||||
function SummaryFields($items = null) {
|
||||
@ -1275,7 +1275,7 @@ JS
|
||||
* Requires {@link Markable()} to return TRUE.
|
||||
* This is only functional with JavaScript enabled.
|
||||
*
|
||||
* @return DataObjectSet of ArrayData objects
|
||||
* @return SS_List of ArrayData objects
|
||||
*/
|
||||
function SelectOptions(){
|
||||
if(!$this->selectOptions) return;
|
||||
@ -1427,7 +1427,7 @@ class TableListField_Item extends ViewableData {
|
||||
* See TableListField->Action for a similiar dummy-function to work
|
||||
* around template-inheritance issues.
|
||||
*
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
function Actions() {
|
||||
$allowedActions = new ArrayList();
|
||||
|
@ -131,7 +131,7 @@ class DataDifferencer extends ViewableData {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a DataObjectSet of the changed fields.
|
||||
* Get a SS_List of the changed fields.
|
||||
* Each element is an array data containing
|
||||
* - Name: The field name
|
||||
* - Title: The human-readable field title
|
||||
|
@ -10,7 +10,7 @@ class DataList extends ViewableData implements SS_List {
|
||||
protected $dataClass;
|
||||
|
||||
/**
|
||||
* The {@link DataQuery} object responsible for getting this DataObjectSet's records
|
||||
* The {@link DataQuery} object responsible for getting this DataList's records
|
||||
*/
|
||||
protected $dataQuery;
|
||||
|
||||
@ -178,9 +178,9 @@ class DataList extends ViewableData implements SS_List {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an Iterator for this DataObjectSet.
|
||||
* This function allows you to use DataObjectSets in foreach loops
|
||||
* @return DataObjectSet_Iterator
|
||||
* Returns an Iterator for this DataList.
|
||||
* This function allows you to use DataLists in foreach loops
|
||||
* @return ArrayIterator
|
||||
*/
|
||||
public function getIterator() {
|
||||
return new ArrayIterator($this->toArray());
|
||||
|
@ -394,7 +394,7 @@ class Hierarchy extends DataExtension {
|
||||
|
||||
/**
|
||||
* Get the children for this DataObject.
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function Children() {
|
||||
if(!(isset($this->_cache_children) && $this->_cache_children)) {
|
||||
@ -413,7 +413,7 @@ class Hierarchy extends DataExtension {
|
||||
|
||||
/**
|
||||
* Return all children, including those 'not in menus'.
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function AllChildren() {
|
||||
return $this->owner->stageChildren(true);
|
||||
@ -425,7 +425,7 @@ class Hierarchy extends DataExtension {
|
||||
* Added children will be marked as "AddedToStage"
|
||||
* Modified children will be marked as "ModifiedOnStage"
|
||||
* Everything else has "SameOnStage" set, as an indicator that this information has been looked up.
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function AllChildrenIncludingDeleted($context = null) {
|
||||
return $this->doAllChildrenIncludingDeleted($context);
|
||||
@ -435,7 +435,7 @@ class Hierarchy extends DataExtension {
|
||||
* @see AllChildrenIncludingDeleted
|
||||
*
|
||||
* @param unknown_type $context
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function doAllChildrenIncludingDeleted($context = null) {
|
||||
if(!$this->owner) user_error('Hierarchy::doAllChildrenIncludingDeleted() called without $this->owner');
|
||||
@ -515,7 +515,7 @@ class Hierarchy extends DataExtension {
|
||||
*
|
||||
* @param showAll Inlcude all of the elements, even those not shown in the menus.
|
||||
* (only applicable when extension is applied to {@link SiteTree}).
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function stageChildren($showAll = false) {
|
||||
if($this->owner->db('ShowInMenus')) {
|
||||
@ -540,7 +540,7 @@ class Hierarchy extends DataExtension {
|
||||
* @param boolean $showAll Include all of the elements, even those not shown in the menus.
|
||||
* (only applicable when extension is applied to {@link SiteTree}).
|
||||
* @param boolean $onlyDeletedFromStage Only return items that have been deleted from stage
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function liveChildren($showAll = false, $onlyDeletedFromStage = false) {
|
||||
if(!$this->owner->hasExtension('Versioned')) throw new Exception('Hierarchy->liveChildren() only works with Versioned extension applied');
|
||||
@ -587,7 +587,7 @@ class Hierarchy extends DataExtension {
|
||||
/**
|
||||
* Return all the parents of this class in a set ordered from the lowest to highest parent.
|
||||
*
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function getAncestors() {
|
||||
$ancestors = new ArrayList();
|
||||
|
@ -57,7 +57,7 @@ class SQLMap extends Object implements IteratorAggregate {
|
||||
|
||||
/**
|
||||
* Get the items in this class.
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function getItems() {
|
||||
$this->genItems();
|
||||
|
@ -908,8 +908,8 @@ class Versioned extends DataExtension {
|
||||
* @param string $sort A sort expression to be inserted into the ORDER BY clause.
|
||||
* @param string $join A join expression, such as LEFT JOIN or INNER JOIN
|
||||
* @param int $limit A limit on the number of records returned from the database.
|
||||
* @param string $containerClass The container class for the result set (default is DataObjectSet)
|
||||
* @return DataObjectSet
|
||||
* @param string $containerClass The container class for the result set (default is DataList)
|
||||
* @return SS_List
|
||||
*/
|
||||
static function get_by_stage($class, $stage, $filter = '', $sort = '', $join = '', $limit = '', $containerClass = 'DataList') {
|
||||
$result = DataObject::get($class, $filter, $sort, $join, $limit, $containerClass);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* You should run Covert::raw2xml or whatever is appropriate before using it.
|
||||
*
|
||||
* Optionally (but recommended), is creating a static usable_tags method,
|
||||
* which will return a DataObjectSet of all the usable tags that can be parsed.
|
||||
* which will return a SS_List of all the usable tags that can be parsed.
|
||||
* This will (mostly) be used to create helper blocks - telling users what things will be parsed.
|
||||
* Again, @see BBCodeParser for an example of the syntax
|
||||
*
|
||||
|
@ -6,7 +6,7 @@
|
||||
* it just receives a set of search parameters and an object class it acts on.
|
||||
*
|
||||
* The default output of a SearchContext is either a {@link SQLQuery} object
|
||||
* for further refinement, or a {@link DataObjectSet} that can be used to display
|
||||
* for further refinement, or a {@link SS_List} that can be used to display
|
||||
* search results, e.g. in a {@link TableListField} instance.
|
||||
*
|
||||
* In case you need multiple contexts, consider namespacing your request parameters
|
||||
@ -159,7 +159,7 @@ class SearchContext extends Object {
|
||||
* @param array $searchParams
|
||||
* @param string|array $sort
|
||||
* @param string|array $limit
|
||||
* @return DataObjectSet
|
||||
* @return SS_List
|
||||
*/
|
||||
public function getResults($searchParams, $sort = false, $limit = false) {
|
||||
$searchParams = array_filter($searchParams, array($this,'clearEmptySearchFields'));
|
||||
|
@ -717,7 +717,7 @@ class Member extends DataObject {
|
||||
/**
|
||||
* Check if the member is in one of the given groups.
|
||||
*
|
||||
* @param array|DataObjectSet $groups Collection of {@link Group} DataObjects to check
|
||||
* @param array|SS_List $groups Collection of {@link Group} DataObjects to check
|
||||
* @param boolean $strict Only determine direct group membership if set to true (Default: false)
|
||||
* @return bool Returns TRUE if the member is in one of the given groups, otherwise FALSE.
|
||||
*/
|
||||
@ -1001,7 +1001,7 @@ class Member extends DataObject {
|
||||
|
||||
$groupIDList = array();
|
||||
|
||||
if(is_a($groups, 'DataObjectSet')) {
|
||||
if(is_a($groups, 'SS_List')) {
|
||||
foreach( $groups as $group )
|
||||
$groupIDList[] = $group->ID;
|
||||
} elseif(is_array($groups)) {
|
||||
@ -1047,7 +1047,7 @@ class Member extends DataObject {
|
||||
|
||||
$groupIDList = array();
|
||||
|
||||
if(is_a($groups, 'DataObjectSet')) {
|
||||
if(is_a($groups, 'SS_List')) {
|
||||
foreach($groups as $group) {
|
||||
$groupIDList[] = $group->ID;
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ class Permission extends DataObject {
|
||||
* Returns all members for a specific permission.
|
||||
*
|
||||
* @param $code String|array Either a single permission code, or a list of permission codes
|
||||
* @return DataObjectSet Returns a set of member that have the specified
|
||||
* @return SS_List Returns a set of member that have the specified
|
||||
* permission.
|
||||
*/
|
||||
public static function get_members_by_permission($code) {
|
||||
@ -405,7 +405,7 @@ class Permission extends DataObject {
|
||||
/**
|
||||
* Return all of the groups that have one of the given permission codes
|
||||
* @param $codes array|string Either a single permission code, or an array of permission codes
|
||||
* @return DataObjectSet The matching group objects
|
||||
* @return SS_List The matching group objects
|
||||
*/
|
||||
static function get_groups_by_permission($codes) {
|
||||
if(!is_array($codes)) $codes = array($codes);
|
||||
|
@ -19,7 +19,7 @@ class PermissionCheckboxSetField extends FormField {
|
||||
protected $hiddenPermissions = array();
|
||||
|
||||
/**
|
||||
* @var DataObjectSet
|
||||
* @var SS_List
|
||||
*/
|
||||
protected $records = null;
|
||||
|
||||
@ -33,7 +33,7 @@ class PermissionCheckboxSetField extends FormField {
|
||||
* @param String $title
|
||||
* @param String $managedClass
|
||||
* @param String $filterField
|
||||
* @param Group|DataObjectSet $records One or more {@link Group} or {@link PermissionRole} records
|
||||
* @param Group|SS_List $records One or more {@link Group} or {@link PermissionRole} records
|
||||
* used to determine permission checkboxes.
|
||||
* Caution: saveInto() can only be used with a single record, all inherited permissions will be marked readonly.
|
||||
* Setting multiple groups only makes sense in a readonly context. (Optional)
|
||||
@ -47,7 +47,7 @@ class PermissionCheckboxSetField extends FormField {
|
||||
} elseif($records instanceof Group) {
|
||||
$this->records = new ArrayList(array($records));
|
||||
} elseif($records) {
|
||||
throw new InvalidArgumentException('$record should be either a Group record, or a DataObjectSet of Group records');
|
||||
throw new InvalidArgumentException('$record should be either a Group record, or a SS_List of Group records');
|
||||
}
|
||||
|
||||
// Get all available codes in the system as a categorized nested array
|
||||
|
@ -36,7 +36,7 @@ class ComplexTableFieldTest extends FunctionalTest {
|
||||
$parser = new CSSContentParser($field->FieldHolder());
|
||||
|
||||
$this->assertEquals(count($parser->getBySelector('tbody tr')), 2, 'There are 2 players (rows) in the table');
|
||||
$this->assertEquals($field->Items()->Count(), 2, 'There are 2 CTF items in the DataObjectSet');
|
||||
$this->assertEquals($field->Items()->Count(), 2, 'There are 2 CTF items in the SS_List');
|
||||
}
|
||||
|
||||
function testAddingManyManyNewPlayer() {
|
||||
|
@ -294,7 +294,7 @@ class TableListFieldTest extends SapphireTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that a DataObjectSet can be passed to TableListField
|
||||
* Check that a SS_List can be passed to TableListField
|
||||
*/
|
||||
function testDataObjectSet() {
|
||||
$one = new TableListFieldTest_Obj;
|
||||
|
Loading…
Reference in New Issue
Block a user