1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Utils/Traits/BulkOptions.php
David Bomba f712b789ca
Fixes for tests (#3184)
* fix typo

* php-cs traits

* CS fixer pass

* Password protect User routes

* Implement checks to prevent editing a deleted record

* Clean up payment flows

* Fixes for tests
2019-12-31 08:59:12 +11:00

55 lines
890 B
PHP

<?php
namespace App\Utils\Traits;
trait BulkOptions
{
/**
* Store method in requests.
*
* @var string
*/
public static $STORE_METHOD = 'create';
/**
* Default chunk size.
*
* @var int
*/
public static $CHUNK_SIZE = 100;
/**
* Default queue for bulk processing.
*
* @var string
*/
public static $DEFAULT_QUEUE = 'bulk_processing';
/**
* Available bulk options - used in requests (eg. BulkClientRequests)
*
* @return array
* @var array
*/
public function getBulkOptions()
{
return [
'create', 'edit', 'view',
];
}
/**
* Shared rules for bulk requests.
*
* @return array
* @var array
*/
public function getGlobalRules()
{
return [
'action' => ['required'],
];
}
}