]> _ Git - cubist_cms-back.git/commitdiff
#2783
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 27 May 2019 15:47:59 +0000 (17:47 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 27 May 2019 15:47:59 +0000 (17:47 +0200)
src/app/Magic/Models/CubistMagicModelAbstract.php

index 6cdfc640b1e0a72f218dc46da186e711f5612668..0ae20ce785e4c55830c85680958d94c754a50a78 100644 (file)
@@ -3,7 +3,6 @@
 
 namespace Cubist\Backpack\app\Magic\Models;
 
-use Backpack\CRUD\CrudTrait;
 use Cubist\Backpack\app\Magic\Fields\Field;
 use Cubist\Backpack\app\Magic\Util;
 use Cviebrock\EloquentSluggable\Sluggable;
@@ -17,8 +16,13 @@ use Webfactor\Laravel\Backpack\NestedModels\Traits\NestedModelTrait;
 class CubistMagicModelAbstract extends Model
 {
     use CubistMagicAttribute;
-    use NestedModelTrait;
-    use Sluggable, SluggableScopeHelpers;
+    use SluggableScopeHelpers;
+    use NestedModelTrait {
+        replicate as private replicateNodeTrait;
+    }
+    use Sluggable {
+        replicate as private replicateSluggable;
+    }
 
     protected static $_doctrineTypesMapping = ['int' => 'integer'];
 
@@ -193,6 +197,12 @@ class CubistMagicModelAbstract extends Model
         }
     }
 
+    public function replicate(array $except = null)
+    {
+        $this->replicateNodeTrait($except);
+        $this->replicateSluggable($except);
+    }
+
     public static function toDoctrineType($type)
     {
         if (isset(self::$_doctrineTypesMapping[$type])) {
@@ -200,4 +210,6 @@ class CubistMagicModelAbstract extends Model
         }
         return $type;
     }
+
+
 }