How to override Parser.php ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alexvam1
    Junior Member
    • Oct 2023
    • 12

    How to override Parser.php ?

    Hi!

    I need to change /crm/application/Espo/Core/Formula/Parser.php

    Code:
    private string $attributeNameRegExp = "/^[a-zA-Z0-9.]+$/";
    to:
    Code:
    private string $attributeNameRegExp = "/^[a-zA-Z0-9._]+$/";


    How can i make this change to /crm/application/Espo/Core/Formula/Parser.php by the "upgrade safe" way, not editing /crm/application/ folder.

    Making custom file at /crm/custom/Espo/Core/Formula/Parser.php not working.
  • emillod
    Active Community Member
    • Apr 2017
    • 1425

    #2
    You can create your own in custom directory and use it instead of default.

    Comment

    • alexvam1
      Junior Member
      • Oct 2023
      • 12

      #3
      Originally posted by emillod
      You can create your own in custom directory and use it instead of default.
      Thanks!
      How to use my own parser instead of default for whole espoCRM code?!

      Comment

      • emillod
        Active Community Member
        • Apr 2017
        • 1425

        #4
        You have to implement it as a new formula
        Formula functions - EspoCRM Documentation

        Comment

        • alexvam1
          Junior Member
          • Oct 2023
          • 12

          #5
          Originally posted by emillod
          You have to implement it as a new formula
          Formula functions - EspoCRM Documentation
          No

          I need to add symbol _ to formula script parser.

          Comment

          Working...