Please note, this is a STATIC archive of website www.perfexcrm.com from 28 Sep 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Customization

Action Hooks

It’s not recomended to add action hooks in the core files. Navigate to application/helpers/my_functions_helper.php. This file is reserved for all your functions.

Add Action Hook

Example action hook for after_client_added
Note: this code should be inside my_functions_helper.php mentioned earlier.

This is example where the action do not expect to return $data.

Example action hook for before_client_added
This is example where the action expect to return $data

  • Authentication
    • before_staff_login
      Expected to return: Nothing

      Params Type Description
      $data Array $data[’email’] and $data[‘userid’]

       


    • before_client_login
      Expected to return: Nothing

      Params Type Description
      $data Array $data[’email’] and $data[‘userid’]

       


    • before_client_logout
      Expected to return: Nothing

      Params Type Description
      $id Integer Client ID that is trying to logout

       


    • before_staff_logout
      Expected to return: Nothing

      Params Type Description
      $id Integer Staff ID that is trying to logout

       


    • after_user_logout
      Expected to return: Nothing

      Params Type Description
      Generally for both staff and users

       


    • before_user_reset_password
      Expected to return: Nothing

      Params Type Description
      $data Array $data[‘staff’] (is user staff or not) and $data[‘userid’]

       


  • Announcements
    • before_announcement_added
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • after_announcement_added
      Expected to return: Nothing

      Params Type Description
      $id Integer Added Announcement ID

       


    • before_announcement_updated
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • after_announcement_updated
      Expected to return: Nothing

      Params Type Description
      $id Integer Announcement ID

       


    • before_announcement_deleted
      Expected to return: Nothing

      Params Type Description
      $id Integer Announcement ID

       


  • Clients
    • before_client_added
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • after_client_added
      Expected to return: Nothing

      Params Type Description
      $id Integer Client ID

       


    • before_client_updated
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • after_client_updated
      Expected to return: Nothing

      Params Type Description
      $id Integer Client ID

       


    • before_client_deleted
      Expected to return: Nothing

      Params Type Description
      $id Integer Client ID

       


  • Contracts
    • before_contract_added
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • after_contract_added
      Expected to return: Nothing

      Params Type Description
      $id Integer Contract ID

       


    • before_contract_updated
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • after_contract_updated
      Expected to return: Nothing

      Params Type Description
      $id Integer Contract ID

       


    • before_contract_deleted
      Expected to return: Nothing

      Params Type Description
      $id Integer Contract ID

       


  • Departments
    • after_department_added
      Expected to return: Nothing

      Params Type Description
      $id Integer Department ID

       


    • before_department_added
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • before_department_deleted
      Expected to return: Nothing

      Params Type Description
      $id Integer Department ID

       


  • Invoices
    • after_invoice_added
      Expected to return: Nothing

      Params Type Description
      $id Integer Get the last invoice ID

       


    • before_invoice_added
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • before_invoice_updated
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • after_invoice_updated
      Expected to return: Nothing

      Params Type Description
      $id Integer Updated invoice ID

       


    • before_invoice_deleted
      Expected to return: Nothing

      Params Type Description
      $id Integer The invoice ID to be deleted

       


  • Estimates
    • after_estimate_added
      Expected to return: Nothing

      Params Type Description
      $id Integer Get the last estimate ID

       


    • before_estimate_added
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • before_estimate_updated
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • after_estimate_updated
      Expected to return: Nothing

      Params Type Description
      $id Integer Updated estimate ID

       


    • before_estimate_deleted
      Expected to return: Nothing

      Params Type Description
      $id Integer The estimate ID to be deleted

       


  • Leads
    • before_lead_added
      Expected to return: Nothing

      Params Type Description
      $id Integer Lead ID

       


    • before_lead_deleted
      Expected to return: Nothing

      Params Type Description
      $id Integer Lead ID

       


  • Payments
    • before_payment_recorded
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • before_payment_updated
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • before_payment_deleted
      Expected to return: Nothing

      Params Type Description
      $id Integer Payment ID

       


  • Settings
    • before_settings_updated
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


  • Tickets
    • before_ticket_reply_add
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • before_ticket_created
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


    • after_ticket_added
      Expected to return: Nothing

      Params Type Description
      $id Integer Ticket ID

       


    • before_ticket_deleted
      Expected to return: Nothing

      Params Type Description
      $id Integer Ticket ID

       


    • before_ticket_settings_updated
      Expected to return: $data

      Params Type Description
      $data Array All $_POST data send to function

       


  • Other
    • before_build_admin_aside_menu
      Expected to return: $data

      Params Type Description
      $data Array Side menu items, feel free to edit remove or delete

       


    • before_build_admin_customizer_menu
      Expected to return: $data

      Params Type Description
      $data Array Customizer(settings) menu items, feel free to edit remove or delete

       


    • before_email_template_send
      Expected to return: $data

      Params Type Description
      $data Array The email template is already parsed

       


Was this helpful?