| @@ -9,14 +9,25 @@ | ||
| 9 | 9 | use BitCode\BitForm\Core\Form\FormHandler; |
| 10 | 10 | use BitCode\BitForm\Core\Integration\IntegrationHandler; |
| 11 | 11 | use BitCode\BitForm\Core\WorkFlow\WorkFlowHandler; |
| 12 | 12 | |
| 13 | -class FormEntryMetaChange { | |
| 14 | - public function __construct() { | |
| 13 | +class FormEntryMetaChange | |
| 14 | +{ | |
| 15 | + private $formID; | |
| 16 | + | |
| 17 | + private $fieldKey; | |
| 18 | + | |
| 19 | + private $field_name; | |
| 20 | + | |
| 21 | + private $fallbackModel; | |
| 22 | + | |
| 23 | + public function __construct() | |
| 24 | + { | |
| 15 | 25 | $this->fallbackModel = new FallbackModel(); |
| 16 | 26 | } |
| 17 | 27 | |
| 18 | - public function changeMeta() { | |
| 28 | + public function changeMeta() | |
| 29 | + { | |
| 19 | 30 | $formHandler = FormHandler::getInstance(); |
| 20 | 31 | $all_forms = $formHandler->admin->getAllForm(); |
| 21 | 32 | foreach ($all_forms as $form) { |
| 22 | 33 | $this->formID = $form->id; |
| @@ -33,9 +44,10 @@ | ||
| 33 | 44 | } |
| 34 | 45 | } |
| 35 | 46 | } |
| 36 | 47 | |
| 37 | - private function changeIntegKey() { | |
| 48 | + private function changeIntegKey() | |
| 49 | + { | |
| 38 | 50 | $integrationHandler = new IntegrationHandler($this->formID); |
| 39 | 51 | |
| 40 | 52 | $formIntegrations = $integrationHandler->getAllIntegration(); |
| 41 | 53 | |
| @@ -45,9 +57,10 @@ | ||
| 45 | 57 | $this->fallbackModel->changeIntegKey($integId, $integstr); |
| 46 | 58 | } |
| 47 | 59 | } |
| 48 | 60 | |
| 49 | - private function changeWorkflowKey() { | |
| 61 | + private function changeWorkflowKey() | |
| 62 | + { | |
| 50 | 63 | $workflowHandler = new WorkFlowHandler($this->formID); |
| 51 | 64 | $formWorkflows = $workflowHandler->getAllworkFlow(); |
| 52 | 65 | foreach ($formWorkflows as $workflow) { |
| 53 | 66 | $workflowId = $workflow['id']; |
| @@ -62,9 +75,10 @@ | ||
| 62 | 75 | $this->fallbackModel->changeWorkflowKey($workflowId, $logics, $workflowAction); |
| 63 | 76 | } |
| 64 | 77 | } |
| 65 | 78 | |
| 66 | - private function changeSuccessMessageKey() { | |
| 79 | + private function changeSuccessMessageKey() | |
| 80 | + { | |
| 67 | 81 | $successMessageModel = new SuccessMessageModel(); |
| 68 | 82 | $allSuccessMessages = $successMessageModel->get(); |
| 69 | 83 | |
| 70 | 84 | foreach ($allSuccessMessages as $message) { |
| @@ -74,9 +88,10 @@ | ||
| 74 | 88 | $this->fallbackModel->changeSuccessMessageKey($messageId, $title, $content); |
| 75 | 89 | } |
| 76 | 90 | } |
| 77 | 91 | |
| 78 | - private function changeEmailTempKey() { | |
| 92 | + private function changeEmailTempKey() | |
| 93 | + { | |
| 79 | 94 | $emailTemplateModel = new EmailTemplateModel(); |
| 80 | 95 | $allEmailTemp = $emailTemplateModel->get(); |
| 81 | 96 | |
| 82 | 97 | foreach ($allEmailTemp as $temp) { |