]> _ Git - pmi.git/commitdiff
wait #7116
authorsoufiane <soufiane@cubedesigners.com>
Mon, 14 Oct 2024 16:07:26 +0000 (18:07 +0200)
committersoufiane <soufiane@cubedesigners.com>
Mon, 14 Oct 2024 16:07:26 +0000 (18:07 +0200)
app/SubForms/News.php

index d15498f7ca5233e0b6e304c8a246018b1e42e629..bda9d511fb5f2f1cb8c8203fef93c120342ce8ad 100644 (file)
@@ -46,7 +46,7 @@ class News extends SubForm
         $this->addField(['name' => 'page_product',
             'label' => 'Page produit',
             'type' => 'SelectFromArray',
-            'options' => self::getDataByModel('catalog_products'),
+            'options' => self::getDataByTable('catalog_products'),
             'multiple' => false,
             'default' => ''
         ]);
@@ -54,19 +54,19 @@ class News extends SubForm
         $this->addField(['name' => 'page_page',
             'label' => 'Page generale',
             'type' => 'SelectFromArray',
-            'options' => self::getDataByModel('cubist_cms_pages'),
+            'options' => self::getDataByTable('cubist_cms_pages'),
             'multiple' => false,
         ]);
 
         $this->addField(['name' => 'page_news',
             'label' => 'Page actualités',
             'type' => 'SelectFromArray',
-            'options' => self::getDataByModel('cubist_news'),
+            'options' => self::getDataByTable('cubist_news'),
             'multiple' => false,
         ]);
     }
 
-    public function getDataByModel($table) {
+    public function getDataByTable($table) {
         $column = 'title';
         $local = request()->query('locale') ?? $this->defaultLang;