blob: cd033754e9c47f9035149a9fa8338f64b6ef82f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
namespace Civi\Api4\Service\Spec\Provider;
use Civi\Api4\Service\Spec\RequestSpec;
class CustomGroupCreationSpecProvider implements SpecProviderInterface {
/**
* @inheritDoc
*/
public function modifySpec(RequestSpec $spec) {
return $spec->getFieldByName('extends')->setRequired(TRUE);
}
/**
* @inheritDoc
*/
public function applies($entity, $action) {
return $entity === 'CustomGroup' && $action === 'create';
}
}
|