mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API Add onBeforeManipulate extension hook
This commit is contained in:
parent
3d8dc82d63
commit
6c42463b67
@ -11,6 +11,7 @@ use SilverStripe\ORM\Queries\SQLUpdate;
|
|||||||
use SilverStripe\ORM\Queries\SQLInsert;
|
use SilverStripe\ORM\Queries\SQLInsert;
|
||||||
use BadMethodCallException;
|
use BadMethodCallException;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use SilverStripe\Core\Extensible;
|
||||||
use SilverStripe\Dev\Backtrace;
|
use SilverStripe\Dev\Backtrace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -19,6 +20,7 @@ use SilverStripe\Dev\Backtrace;
|
|||||||
*/
|
*/
|
||||||
abstract class Database
|
abstract class Database
|
||||||
{
|
{
|
||||||
|
use Extensible;
|
||||||
|
|
||||||
const PARTIAL_QUERY = 'partial_query';
|
const PARTIAL_QUERY = 'partial_query';
|
||||||
const FULL_QUERY = 'full_query';
|
const FULL_QUERY = 'full_query';
|
||||||
@ -386,6 +388,7 @@ abstract class Database
|
|||||||
*/
|
*/
|
||||||
public function manipulate($manipulation)
|
public function manipulate($manipulation)
|
||||||
{
|
{
|
||||||
|
$this->extend('onBeforeManipulate', $manipulation);
|
||||||
if (empty($manipulation)) {
|
if (empty($manipulation)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user