1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Utils/Traits/BulkOptions.php

61 lines
1.1 KiB
PHP
Raw Normal View History

<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
2024-04-12 06:15:41 +02:00
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
2021-06-16 08:58:16 +02:00
* @license https://www.elastic.co/licensing/elastic-license
*/
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
*/
public function getBulkOptions()
{
return [
'create', 'edit', 'view',
];
}
/**
* Shared rules for bulk requests.
*
* @return array
*/
public function getGlobalRules()
{
return [
'action' => ['required'],
];
}
}