Skip to content

Commit

Permalink
MINOR Class documentation for GridFieldDeleteAction
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Harvey committed Mar 22, 2012
1 parent 4da42f2 commit ff4c820
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions 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
Expand Down Expand Up @@ -125,4 +134,4 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat
$gridField->getList()->remove($item);
}
}
}
}

0 comments on commit ff4c820

Please sign in to comment.