Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Class documentation for GridFieldDeleteAction

  • Loading branch information...
commit ff4c82039d2359f09361cd08d0f6efe70dc9103f 1 parent 4da42f2
@halkyon halkyon authored
Showing with 13 additions and 4 deletions.
  1. +13 −4 forms/gridfield/GridFieldDeleteAction.php
View
17 forms/gridfield/GridFieldDeleteAction.php
@@ -1,11 +1,20 @@
<?php
/**
- * This class is an GridField Component that add Delete action for Objects in the GridField.
- * See {@link GridFieldRemoveButton} for detaching an item from the current relationship instead.
+ * This class is an GridField component that adds a delete action for objects in a {@link GridField}.
+ *
+ * This will also supports unlinking a relation instead of deleting the object. Use the {@link $removeRelation}
+ * property set in the constructor.
+ *
+ * <code>
+ * $action = new GridFieldDeleteAction(); // delete objects permanently
+ * $action = new GridFieldDeleteAction(true); // removes the relation to object, instead of deleting
+ * </code>
+ *
+ * @package sapphire
+ * @subpackage gridfield
*/
class GridFieldDeleteAction implements GridField_ColumnProvider, GridField_ActionProvider {
-
/**
* If this is set to true, this actionprovider will remove the object from the list, instead of
* deleting. In the case of a has one, has many or many many list it will uncouple the item from
@@ -125,4 +134,4 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat
$gridField->getList()->remove($item);
}
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.