FormB.php 1.0 KB

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