]> _ Git - cubist_cms-back.git/commitdiff
#2783
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 29 May 2019 17:14:24 +0000 (19:14 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 29 May 2019 17:14:24 +0000 (19:14 +0200)
src/app/Magic/Models/CubistMagicAbstractModel.php

index bf250cc43fd3d65d051cc46e7cf45a8cb12c8158..a828648a23a129ace26fbef1a915cf35f793a98d 100644 (file)
@@ -44,6 +44,11 @@ class CubistMagicAbstractModel extends Model
      */
     protected $_slugFields = ['slug', 'title', 'name'];
 
+    /**
+     * @var array
+     */
+    protected $translatable = [];
+
     public function __construct(array $attributes = [])
     {
         $this->setFields();
@@ -115,6 +120,9 @@ class CubistMagicAbstractModel extends Model
         if ($field->getAttribute('hidden')) {
             $this->hidden[] = $name;
         }
+        if ($field->getAttribute('translatable')) {
+            $this->translatable[] = $name;
+        }
     }
 
     public function generateCode()