-
-
Save totten/84c140310d4adc9b5d3842b5d3364a9e to your computer and use it in GitHub Desktop.
Type-based subfields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
civicrm_api4('MyEntity', 'create', [ | |
'values' => [ | |
'severity' => 'error', | |
'type' => 'filelog', | |
'options' => ['filename' => '/tmp/foo.log'] | |
], | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<field> | |
<name>severity</name> | |
<type>string</type> | |
<psuedoconstant> | |
<options>...info,error,warning...</options> | |
<pseudoconstant> | |
</field> | |
<field> | |
<name>type</name> | |
<type>string</type> | |
<psuedoconstant> | |
<options>...filelog,emaillog,firephplog...</options> | |
<pseudoconstant> | |
</field> | |
<field> | |
<name>options</name> | |
<serialize>JSON</serialize> | |
<type>text</type> | |
<subfields> | |
<subfield> | |
<matchType>filelog</matchType> | |
<name>filename</name> | |
<type>string</type> | |
</subfield> | |
<subfield> | |
<matchType>emaillog</matchType> | |
<name>email_address</name> | |
<type>string</type> | |
</subfield> | |
</subfields> | |
</field> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment