From: Vincent Vanwaelscappel Date: Mon, 27 May 2019 15:47:59 +0000 (+0200) Subject: #2783 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e3f0d975c2e25336e1eb226fb3af47e3358e78fa;p=cubist_cms-back.git #2783 --- diff --git a/src/app/Magic/Models/CubistMagicModelAbstract.php b/src/app/Magic/Models/CubistMagicModelAbstract.php index 6cdfc64..0ae20ce 100644 --- a/src/app/Magic/Models/CubistMagicModelAbstract.php +++ b/src/app/Magic/Models/CubistMagicModelAbstract.php @@ -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; } + + }