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

Add function to return all valid types

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.19
    • Fix Version/s: 4.7.28
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      The Utils_Type class contains constants and validation for the field types.

      However it would be useful for validation purposes if we could separate the action validation of data from validation of types. I suggest adding a function that returns the types in an associative array, with "type name" => "integer representing type", for example:

       

      'Int' => self::T_INT

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              michael Michael Devery
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 20 minutes
                20m
                Remaining:
                Remaining Estimate - 20 minutes
                20m
                Logged:
                Time Spent - Not Specified
                Not Specified