}
/**
+ * Converts params from flat array e.g. ['GroupName.Fieldname' => value] to the
+ * hierarchy expected by the BAO, nested within $params['custom'].
+ *
* @param array $params
* @param int $entityId
*
protected function formatCustomParams(&$params, $entityId) {
$customParams = [];
- // $customValueID is the ID of the custom value in the custom table for this
- // entity (i guess this assumes it's not a multi value entity)
foreach ($params as $name => $value) {
$field = $this->getCustomFieldInfo($name);
if (!$field) {
*
* @param string $fieldExpr
* Field identifier with possible suffix, e.g. MyCustomGroup.MyField1:label
- * @return array|NULL
+ * @return array{id: int, name: string, entity: string, suffix: string, html_type: string, data_type: string}|NULL
*/
protected function getCustomFieldInfo(string $fieldExpr) {
if (strpos($fieldExpr, '.') === FALSE) {