for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @package elemental
*/
class BetterBetterButtons extends GridFieldBetterButtonsItemRequest
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* Needed to add proper permissions around buttons
*
* @param Form The ItemEditForm object
public function updateItemEditForm($form) {
parent::updateItemEditForm($form);
$actions = $form->Actions();
if (!$this->owner->record->canDelete()) {
$actions->removeByName('action_doDelete');
$actions->removeByName('action_cancelDelete');
}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.