public function NewObject() {
		$id = (int) $this->request->requestVar('new');
		if ($id) {
			$item = DataObject::get_by_id($this->CreateType, $id);
			if (!$item) {
				$item = Versioned::get_by_stage($this->CreateType, 'Stage')->byID($id);
			}
			return $item;
		}

		return null;
	}
public function NewObject() {
		$id = (int) $this->request->requestVar('new');
		if ($id) {
			$item = DataObject::get_by_id($this->CreateType, $id);
			if (!$item) {
				$item = Versioned::get_by_stage($this->CreateType, 'Stage')->byID($id);
			}
			return $item;
		}

		return null;
	}
public function NewObject ( ) { $ id = ( int ) $ this -> request -> requestVar ( 'new' ) ; if ( $ id ) { $ item = DataObject :: get_by_id ( $ this -> CreateType , $ id ) ; if ( ! $ item ) { $ item = Versioned :: get_by_stage ( $ this -> CreateType , 'Stage' ) -> byID ( $ id ) ; } return $ item ; } return null ; }
Return the new object if set in the URL
@return DataObject
Return the new object if set in the URL