Documentation

mixin.php

The "setting-admin" mixin defines a standard idiom for managing extension settings:

  1. Create a permission "administer {myext}" ("Administer {My Extension}").
  2. Create a page "civicrm/admin/setting/{myext}" (via CRM_Admin_Form_Generic)
  3. Assign all settings from "{myext}" to appear on the page.
  4. Create a link "Administer > System Settings" to "{My Extension} Settings"

(The values of "{myext}" and "{My Extension}" come from info.xml's <file> and <name>.)

If you don't like the defaults, then there are a few override points:

  • If you manually create permission "administer {myext}", then your label/description takes precedence.
  • If you manually register route "civicrm/admin/setting/{myext}", then your definition takes precedence.
  • If you manually configure a setting with settings_page, then that setting will move to the other page. (To make a hidden setting, specify settings_page => [].)
  • If you manually add "civicrm/admin/setting/{myext}" to the menu, then your link takes precedence.

Additionally, there is experimental support for overrides in info.xml. (Respected by v1.0.0 but not guaranteed future.)

My Custom Title

Tags
mixinName

setting-admin

mixinVersion

1.1.1

since
5.68

Table of Contents

Classes

About
Nav

        
On this page

Search results