Skip to content

Proposal add ensureOptionGroupExists, ensureOptionValueExists to installer #174

@eileenmcnaughton

Description

@eileenmcnaughton

We have these 2 functions in core that are good to use on install - but they are not officially supported as an endpoint. I feel like copying them into civix makes sense -

Alternatively we could start to build out the concept of describing options & option groups as metadata (like we do with settings)

  public function install() {
    CRM_Core_BAO_OptionValue::ensureOptionValueExists([
        'option_group_id' => 'wysiwyg_editor',
        'label' => 'CKEditor5',
        'name' => 'CKEditor5',
      ]
    );
    return TRUE;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions