| @@ -1,19 +1,26 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - | |
| 4 | 3 | namespace BitCode\BitForm\Core\Fallback; |
| 5 | 4 | |
| 6 | -use BitCode\BitForm\Core\Form\FormHandler; | |
| 7 | 5 | use BitCode\BitForm\Admin\Form\AdminFormManager; |
| 6 | +use BitCode\BitForm\Core\Database\EmailTemplateModel; | |
| 8 | 7 | use BitCode\BitForm\Core\Database\FallbackModel; |
| 9 | -use BitCode\BitForm\Core\WorkFlow\WorkFlowHandler; | |
| 10 | -use BitCode\BitForm\Core\Database\EmailTemplateModel; | |
| 11 | 8 | use BitCode\BitForm\Core\Database\SuccessMessageModel; |
| 9 | +use BitCode\BitForm\Core\Form\FormHandler; | |
| 12 | 10 | use BitCode\BitForm\Core\Integration\IntegrationHandler; |
| 11 | +use BitCode\BitForm\Core\WorkFlow\WorkFlowHandler; | |
| 13 | 12 | |
| 14 | 13 | class FormEntryMetaChange |
| 15 | 14 | { |
| 15 | + private $formID; | |
| 16 | + | |
| 17 | + private $fieldKey; | |
| 18 | + | |
| 19 | + private $field_name; | |
| 20 | + | |
| 21 | + private $fallbackModel; | |
| 22 | + | |
| 16 | 23 | public function __construct() |
| 17 | 24 | { |
| 18 | 25 | $this->fallbackModel = new FallbackModel(); |
| 19 | 26 | } |
| @@ -19,9 +26,9 @@ | ||
| 19 | 26 | } |
| 20 | 27 | |
| 21 | 28 | public function changeMeta() |
| 22 | 29 | { |
| 23 | - $formHandler = FormHandler::getInstance(); | |
| 30 | + $formHandler = FormHandler::getInstance(); | |
| 24 | 31 | $all_forms = $formHandler->admin->getAllForm(); |
| 25 | 32 | foreach ($all_forms as $form) { |
| 26 | 33 | $this->formID = $form->id; |
| 27 | 34 | $formManager = new AdminFormManager($this->formID); |
| @@ -49,9 +56,8 @@ | ||
| 49 | 56 | $integstr = str_replace("{$this->fieldKey}{$this->field_name}", $this->fieldKey, $integration->integration_details); |
| 50 | 57 | $this->fallbackModel->changeIntegKey($integId, $integstr); |
| 51 | 58 | } |
| 52 | 59 | } |
| 53 | - | |
| 54 | 60 | |
| 55 | 61 | private function changeWorkflowKey() |
| 56 | 62 | { |
| 57 | 63 | $workflowHandler = new WorkFlowHandler($this->formID); |