code/pages/ExternalContentPage.php
public function ContentItem($what='k') {
		if ($this->requestedItem) {
			return $this->requestedItem;
		}

		if (!$this->ExternalContentRoot) {
			return null;
		}

		// See if an item was requested in the url directly
		$id = isset($_REQUEST['item']) ? $_REQUEST['item'] : null;

		if (!$id) {
			$id = $this->ExternalContentRoot;
		}

		$remoteObject = ExternalContent::getDataObjectFor($id);

		if ($remoteObject) {
			$this->requestedItem = $remoteObject;
			return $this->requestedItem;
		}

		return null;
	}
public function ContentItem($what='k') {
		if ($this->requestedItem) {
			return $this->requestedItem;
		}

		if (!$this->ExternalContentRoot) {
			return null;
		}

		// See if an item was requested in the url directly
		$id = isset($_REQUEST['item']) ? $_REQUEST['item'] : null;

		if (!$id) {
			$id = $this->ExternalContentRoot;
		}

		$remoteObject = ExternalContent::getDataObjectFor($id);

		if ($remoteObject) {
			$this->requestedItem = $remoteObject;
			return $this->requestedItem;
		}

		return null;
	}
public function ContentItem ( $ what = 'k' ) { if ( $ this -> requestedItem ) { return $ this -> requestedItem ; } if ( ! $ this -> ExternalContentRoot ) { return null ; } // See if an item was requested in the url directly $ id = isset ( $ _REQUEST [ 'item' ] ) ? $ _REQUEST [ 'item' ] : null ; if ( ! $ id ) { $ id = $ this -> ExternalContentRoot ; } $ remoteObject = ExternalContent :: getDataObjectFor ( $ id ) ; if ( $ remoteObject ) { $ this -> requestedItem = $ remoteObject ; return $ this -> requestedItem ; } return null ; }
Get the external content item

@return DataObject
Get the external content item