/**
  * Return a GridField configured for editing attached MediaModels. If the master record is in the database
  * then also add GridFieldOrderableRows (otherwise complaint re UnsavedRelationList not being a DataList happens).
  *
  * @param string|null $relationshipName
  * @param string|null $configClassName name of grid field configuration class otherwise one is manufactured
  * @return \GridField
  */
 protected function gridField($relationshipName = null, $configClassName = null)
 {
     $relationshipName = $relationshipName ?: static::RelationshipName;
     $config = $this->gridFieldConfig($relationshipName, $configClassName);
     /** @var GridField $gridField */
     $gridField = \GridField::create($relationshipName, $relationshipName, $this->owner->{$relationshipName}(), $config);
     return $gridField;
 }