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

Pass more contact data into hook_civicrm_summary()

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.2.8
    • Fix Version/s: Unscheduled
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)

      Description

      CiviCRM's hook_civicrm_summary() passes in the contact ID, but none of the associated contact data. Seems like you need to kick off your summary hook by loading the contact data via CiviCRM API, which means the data is likely going to be loaded twice.

      For example, I want to modify the summary screen but only for Individual contact type; I need to start with a block of code to load the contact and check the contact type. In my test environment, this adds 0.3s to each contact's summary screen load, which feels wasteful.

        Attachments

          Activity

            People

            • Assignee:
              saurabh.batra Saurabh Batra
              Reporter:
              xurizaemon Chris Burgess
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: