From e9f365ee1eeca285697a820e1c62ce490f6b0615 Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Fri, 5 Jul 2019 08:36:53 +0200 Subject: [PATCH] Updated 026 How to setup a store message method along side the email helper class (markdown) --- ...-a-store-message-method-along-side-the-email-helper-class.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/026-How-to-setup-a-store-message-method-along-side-the-email-helper-class.md b/026-How-to-setup-a-store-message-method-along-side-the-email-helper-class.md index a7c1b47..d34c24a 100644 --- a/026-How-to-setup-a-store-message-method-along-side-the-email-helper-class.md +++ b/026-How-to-setup-a-store-message-method-along-side-the-email-helper-class.md @@ -13,7 +13,7 @@ At the bottom of this class in the 'Send' method, [00:01:21](https://www.youtube Open a component(Learning manager) and go to Libs & Helpers. Scroll down and 'Add PHP(admin_helper)' may be seen and in there is a function called 'storemessage', where the component may be editted. [00:02:47](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m47s) This 'Storemessage' has a signature that exists of values that is transferred to the method. -In the Email Helper Class it also has a signature.[00:03:19](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m19s) Wherever it gives this '=null' with a value, that is the default value. If a value is not added to this position, there is one, two, three, four, five, positions, then it will default it to '=null'.[00:03:51](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m51s) From there all the values receives the value '=null' . It is only nessesary to add the first four values. Those values are all used in this method(see video). [00:04:17](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m17s) This script "if(method_exists('Jobtracking Helper','storeMessage'))" asks whether the method has been created. If not, it simply skips it and returns the value of '$sendmail'. [00:04:52](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m52s)If it have been created, it will pass these variables that correspond to the signature. In that method that is in the Helper Class (PHP), the necessary checks and balances must be done, since the email address is known, a search may be done with the 'getVar' in the User Class. The recipient must equal 'email', and returns the 'id'. [00:05:09](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m09s) That how the 'getVar' operates. Then having the user ID, the number can be verified and be set to the message as 'User'. That is then set as the Email.<<<<<<<<<<<<<<<<<<<<<<<< +In the Email Helper Class it also has a signature. [00:03:19](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m19s) Wherever it gives this '=null' with a value, that is the default value. If a value is not added to this position, there is one, two, three, four, five, positions, then it will default it to '=null'. [00:03:51](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m51s) From there all the values receives the value '=null' . It is only nessesary to add the first four values. Those values are all used in this method(see video). [00:04:17](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m17s) This script "if(method_exists('Jobtracking Helper','storeMessage'))" asks whether the method has been created. If not, it simply skips it and returns the value of '$sendmail'. [00:04:52](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m52s) If it have been created, it will pass these variables that correspond to the signature. In that method that is in the Helper Class (PHP), the necessary checks and balances must be done, since the email address is known, a search may be done with the 'getVar' in the User Class. The recipient must equal 'email', and returns the 'id'. [00:05:09](https://www.youtube.com/watch?v=peVNLsAncGY&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m09s) That is how the 'getVar' operates. Then having the user ID, the number can be verified and be set to the message as 'User'. That is then set as the Email.<<<<<<<<<<<<<<<<<<<<<<<<