for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SilverStripe\AssetAdmin\Forms;
use SilverStripe\Forms\FieldList;
class FolderFormBuilder extends AssetFormBuilder
{
/**
* Build basic actions
*
* @return FieldList
*/
public function getFormActions()
// Add delete action as top level button before extensions are triggered
$this->beforeUpdate('FormActions', function (FieldList $actions) {
if ($deleteAction = $this->getDeleteAction()) {
$actions->push($deleteAction);
}
});
return parent::getFormActions();