silverstripe-framework/ORM/Relation.php
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00

37 lines
889 B
PHP

<?php
namespace SilverStripe\ORM;
use SilverStripe\ORM\FieldType\DBField;
/**
* Abstract representation of a DB relation field, either saved or in memory
*/
interface Relation extends SS_List, SS_Filterable, SS_Sortable, SS_Limitable {
/**
* Sets the ComponentSet to be the given ID list.
* Records will be added and deleted as appropriate.
*
* @param array $idList List of IDs.
*/
public function setByIDList($idList);
/**
* Returns an array with both the keys and values set to the IDs of the records in this list.
*
* Does not return the IDs for unsaved DataObjects
*
* @return array
*/
public function getIDList();
/**
* Return the DBField object that represents the given field on the related class.
*
* @param string $fieldName Name of the field
* @return DBField The field as a DBField object
*/
public function dbObject($fieldName);
}