Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-9025

Add hook_alterGenerateLabel to support html for Labels

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.6
    • Fix Version/s: 4.1.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      There is currently a non-standard approach to changing the way Labels are generated: SetGenerator ($objectinstance, $methodname = 'generateLabel'). (I think using it effectively may also involve hacking core to get the $objectinstance.)

      The attached patch does two things: it allows the parameters used to generate the label to be modified just before they are used, and it also improves support for html labels by calling writeHTMLCell rather than MultiCell if ishtml=true in the arguments (MultiCell documentation indicates that ishtml=true is for internal use only).

      Possible To Do: allow html to be stored into Mailing Label preference via the browser at Administer > Configure > Global Settings > Address Settings, rather than being sanitized.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              joemurray Joe Murray
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: