mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Class documentation for GridFieldDeleteAction
This commit is contained in:
parent
4da42f2baf
commit
ff4c82039d
@ -1,11 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* This class is an GridField Component that add Delete action for Objects in the GridField.
|
* This class is an GridField component that adds a delete action for objects in a {@link GridField}.
|
||||||
* See {@link GridFieldRemoveButton} for detaching an item from the current relationship instead.
|
*
|
||||||
|
* 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 {
|
class GridFieldDeleteAction implements GridField_ColumnProvider, GridField_ActionProvider {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If this is set to true, this actionprovider will remove the object from the list, instead of
|
* 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
|
* deleting. In the case of a has one, has many or many many list it will uncouple the item from
|
||||||
@ -125,4 +134,4 @@ class GridFieldDeleteAction implements GridField_ColumnProvider, GridField_Actio
|
|||||||
$gridField->getList()->remove($item);
|
$gridField->getList()->remove($item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user