]> _ Git - cubist_cms-back.git/commitdiff
wip #5041 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 20 Jan 2022 20:11:08 +0000 (21:11 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 20 Jan 2022 20:11:08 +0000 (21:11 +0100)
src/app/Magic/Models/CubistMagicAbstractModel.php
src/app/Magic/Operations/CreateOperation.php
src/resources/views/columns/select_from_array.blade.php

index 93b641d6d4668131224489ff69c159f0b6b52ef8..f4edbaa91dbea8c3730e5c62fc64b22e9f7c596e 100644 (file)
@@ -135,7 +135,7 @@ class CubistMagicAbstractModel extends Model implements HasMedia
         $query->where('created_ok', 1);
     }
 
-    public function getOwnerAttribute()
+    public function getOwnerFieldName()
     {
         return static::$_ownerAttribute;
     }
index 77c400c04428573632626da6d71aa4ab953dc133..a4036bd608ee8bbaeb98e04197c1b3587b40f8c4 100644 (file)
@@ -22,7 +22,7 @@ trait CreateOperation
         $instance = $this->crud->model;
         if ($instance instanceof CubistMagicAbstractModel) {
             $instance->setAttribute('created_ok', '0');
-            $ownerAttribute = $instance->getOwnerAttribute();
+            $ownerAttribute = $instance->getOwnerFieldName();
             if (null !== $ownerAttribute && $instance->hasField($ownerAttribute)) {
                 $instance->setAttribute($ownerAttribute, backpack_user()->id);
             }
index 4ce99c3ffaae900759e6f30102568df3a57ed9a1..67b6cd653a05a446b172be61a201280d03de7b3a 100644 (file)
             if (isset($column['options'][$values])) {
                 echo $column['options'][$values];
             } else {
+                dd($values,$entry);
                 echo '-';
             }
         }
     } else {
+        dd($values);
         echo "-";
     }
     ?>