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