Переглянути джерело

Implemented __isset function in TranslationProxy. With this the proxy class can be used in twig templates.

Patrick Kaufmann 13 роки тому
батько
коміт
5997970608
1 змінених файлів з 5 додано та 0 видалено
  1. 5 0
      lib/Gedmo/Translator/TranslationProxy.php

+ 5 - 0
lib/Gedmo/Translator/TranslationProxy.php

@@ -98,6 +98,11 @@ class TranslationProxy
 
 
         $this->translatable->$property = $value;
         $this->translatable->$property = $value;
     }
     }
+    
+    public function __isset($property)
+    {
+        return in_array($property, $this->properties);
+    }
 
 
     /**
     /**
      * Returns locale name for the current translation proxy instance.
      * Returns locale name for the current translation proxy instance.