first commit
This commit is contained in:
21
bundles/KupShop/AdminBundle/Query/Invert.php
Normal file
21
bundles/KupShop/AdminBundle/Query/Invert.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace KupShop\AdminBundle\Query;
|
||||
|
||||
use Query\Operator;
|
||||
|
||||
class Invert
|
||||
{
|
||||
public static function checkInvert($operator, $invert, $nullableField = null)
|
||||
{
|
||||
if (isset($invert) && $invert == 1) {
|
||||
if ($nullableField) {
|
||||
return Operator::notOrNull($operator, $nullableField);
|
||||
}
|
||||
|
||||
return Operator::not($operator);
|
||||
}
|
||||
|
||||
return $operator;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user