📜  使用属性在自动完成字段中提供过滤条件 - PHP代码示例

📅  最后修改于: 2022-03-11 14:54:16.728000             🧑  作者: Mango

代码示例1
$form['my_element'] = [
  '#type' => 'entity_autocomplete',
  '#target_type' => 'node',
  '#selection_handler' => 'default:node_by_field',
  '#selection_settings' => [
    'target_bundles' => ['article'],
    'filter' => ['field_dummy_filter' => $dummy_field_value],
  ],
];