blob: 7d5fc2707f2c2facf800d221bbce43ce211e0fb7 (
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 NavigationCreationSpecProvider implements SpecProviderInterface {
/**
* @inheritDoc
*/
public function modifySpec(RequestSpec $spec) {
$spec->getFieldByName('domain_id')->setRequired(FALSE);
}
/**
* @inheritDoc
*/
public function applies($entity, $action) {
return $entity === 'Navigation' && $action === 'create';
}
}
|