code/model/ExternalContent.php
public static function getDataObjectFor($id) {
		if ($id == 'root') {
			return null;
		}

		$obj = null;

		if (preg_match(self::ID_FORMAT, $id, $matches)) {
			$id = $matches[1];
			$composed = isset($matches[2]) ? trim($matches[2], self::ID_SEPARATOR) : null;
			$obj = DataObject::get_by_id(self::DEFAULT_CLASS, $id);
			if ($composed && $obj) {
				$obj = $obj->getObject($composed);
			}
		} else {

		}

		return $obj;
	}
public static function getDataObjectFor($id) {
		if ($id == 'root') {
			return null;
		}

		$obj = null;

		if (preg_match(self::ID_FORMAT, $id, $matches)) {
			$id = $matches[1];
			$composed = isset($matches[2]) ? trim($matches[2], self::ID_SEPARATOR) : null;
			$obj = DataObject::get_by_id(self::DEFAULT_CLASS, $id);
			if ($composed && $obj) {
				$obj = $obj->getObject($composed);
			}
		} else {

		}

		return $obj;
	}
public static function getDataObjectFor ( $ id ) { if ( $ id == 'root' ) { return null ; } $ obj = null ; if ( preg_match ( self :: ID_FORMAT , $ id , $ matches ) ) { $ id = $ matches [ 1 ] ; $ composed = isset ( $ matches [ 2 ] ) ? trim ( $ matches [ 2 ] , self :: ID_SEPARATOR ) : null ; $ obj = DataObject :: get_by_id ( self :: DEFAULT_CLASS , $ id ) ; if ( $ composed && $ obj ) { $ obj = $ obj -> getObject ( $ composed ) ; } } else { } return $ obj ; }
Get the actual object based on a composite ID

Don't really want to use a static, but SS's data object
retrieval system doesn't really provide a nice override
mechanism other than useCustomObject

@param String $id
The compound ID to get a data object for

@return DataObject
Get the actual object based on a composite ID