public function __construct(DataObject $onObject, $relationName, $targetFragment = 'before')
 {
     $this->onObject = $onObject;
     $this->relationName = $relationName;
     $hasOne = $onObject->has_one($relationName);
     if (!$hasOne) {
         user_error('Unable to find a has_one relation named ' . $relationName . ' on ' . $onObject->ClassName, E_USER_WARNING);
     }
     $this->targetObject = $hasOne;
     parent::__construct(false, $targetFragment);
 }
 public function __construct($useToggle = true, $segement = 'before')
 {
     parent::__construct($useToggle, $segement);
     $this->cheatList = new GridFieldManyRelationHandler_HasManyList();
     $this->cheatManyList = new GridFieldManyRelationHandler_ManyManyList();
 }