Skip to content
This repository
Browse code

MINOR Class documentation for GridFieldDeleteAction

  • Loading branch information...
commit ff4c82039d2359f09361cd08d0f6efe70dc9103f 1 parent 4da42f2
Sean Harvey authored March 23, 2012

Showing 1 changed file with 13 additions and 4 deletions. Show diff stats Hide diff stats

  1. 17  forms/gridfield/GridFieldDeleteAction.php
17  forms/gridfield/GridFieldDeleteAction.php
... ...
@@ -1,11 +1,20 @@
1 1
 <?php
2 2
 /**
3  
- * This class is an GridField Component that add Delete action for Objects in the GridField.
4  
- * See {@link GridFieldRemoveButton} for detaching an item from the current relationship instead.
  3
+ * This class is an GridField component that adds a delete action for objects in a {@link GridField}.
  4
+ *
  5
+ * This will also supports unlinking a relation instead of deleting the object. Use the {@link $removeRelation}
  6
+ * property set in the constructor.
  7
+ *
  8
+ * <code>
  9
+ * $action = new GridFieldDeleteAction(); // delete objects permanently
  10
+ * $action = new GridFieldDeleteAction(true); // removes the relation to object, instead of deleting
  11
+ * </code>
  12
+ *
  13
+ * @package sapphire
  14
+ * @subpackage gridfield
5 15
  */
6 16
 class GridFieldDeleteAction implements GridField_ColumnProvider, GridField_ActionProvider {
7 17
 	
8  
-	
9 18
 	/**
10 19
 	 * If this is set to true, this actionprovider will remove the object from the list, instead of 
11 20
 	 * 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
125 134
 			$gridField->getList()->remove($item);
126 135
 		} 
127 136
 	}
128  
-}
  137
+}

0 notes on commit ff4c820

Please sign in to comment.
Something went wrong with that request. Please try again.