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

Public ContributionPage API--requires exposing methods currently limited to form input

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.5, 4.2.1
    • Fix Version/s: 1.5, 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      At CivicSpace we need to programmatically create contribution pages, which currently lack a public API.

      For the pages themselves, RAO and DAO methods exist, but page creation requires more than just the page table to be updated--we need to update all the various tables affected when a user submits a page through the wizard UI.

      It appears that some of the methods we need to call are currently limited to form input. For example, CRM_Contribute_Form_ContributionPage_Amount::postProcess receives form input and creates CustomOption records from it via CRM_Core_DAO_CustomOption. Can this code be called outside the context of form submission? If not, should it be abstracted so that it can?

      Any tips or guidance would be much appreciated. What is the best approach? Are public APIs indeed the best/appropriate means of programmatically creating items? Do we need a series of public APIs: ContributionPage, CustomOption, etc., with ContributionPage calling the others as needed? Is anyone working in this area? Are there plans to extend the public APIs until they include all available items/objects?

      Thanks.

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              nedjo Nedjo Rogers
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: