Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-752

Refactor checkWriteDependencies and checkDeleteDependencies

    XMLWordPrintable

Details

    Description

      Refactor checkWriteDependencies to beforesave() and checkDeleteDependencies to beforedelete().

      Note return(false) will generate "Please recheck the highlighted fields", which is not the best error message. One way to address this might be to set a flash message in beforesave/delete, and then not use the default error in StandardController if save fails. Or maybe throw an exception.

      Also, checkWriteDependencies is passed $curdata, which beforesave/delete does not by default have access to.

      See Model/EmailAddress.php::beforeSave() as a potential template.

      Attachments

        Activity

          People

            benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
            benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: