Add feature flags API

[MAILPOET-2008]
This commit is contained in:
Jan Jakeš
2019-05-13 14:34:47 +02:00
committed by M. Shull
parent 1b091f144b
commit ab683b47de
6 changed files with 111 additions and 0 deletions

View File

@ -9,4 +9,14 @@ if (!defined('ABSPATH')) exit;
*/
class FeatureFlag extends Model {
public static $_table = MP_FEATURE_FLAGS_TABLE;
static function createOrUpdate($data = []) {
$keys = false;
if (isset($data['name'])) {
$keys = [
'name' => $data['name'],
];
}
return parent::_createOrUpdate($data, $keys);
}
}