FormA.php 932 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Models\Parameter\Pro;
  3. use App\Helpers\ProUtils;
  4. use App\Helpers\ParameterUtils;
  5. class FormA extends \App\Models\Parameter\FormA
  6. {
  7. public function __construct($bpa, $customParaName = null, $themeDir = null, $popupOptions = false)
  8. {
  9. $this->bpa = ProUtils::bpaDecoding($bpa);
  10. if (isset($customParaName)) {
  11. $this->bpa['para_name'] = $customParaName;
  12. }
  13. $themeDir = $themeDir ?? $this->bpa['theme_dir'];
  14. if ($themeDir && $themeDir !== 'empty') {
  15. $this->data = ProUtils::getThemeParamFile($this->bpa['para_name'], '.json', $themeDir, $popupOptions);
  16. } else {
  17. $this->data = ProUtils::getParamFile($this->bpa['para_name'], '.json', $popupOptions);
  18. }
  19. $this->data['General'] = array_merge($this->data['General'], ['returnUrl' => $this->bpa['page_uri'].'?bpa='.$bpa]);
  20. $this->converterData();
  21. }
  22. }