}
- public function getDecodedAttributes(){
- $res=new \stdClass();
- foreach ($this->attributes as $key=>$value) {
- $res->$key=Json::decodeRecursive($this->getAttribute($key),Json::TYPE_OBJECT);
+ public function getDecodedAttributes()
+ {
+ $res = new \stdClass();
+ foreach ($this->attributes as $key => $value) {
+ $res->$key = Json::decodeRecursive($this->getAttribute($key), Json::TYPE_OBJECT);
}
- $res->entity=$this;
+ $res->entity = $this;
return $res;
}
$translate->addPath(app_path() . '/' . $path);
}
+ $this->addField(['name' => 'k',
+ 'label' => '-',
+ 'type' => 'Hidden',
+ 'translatable' => true,
+ 'store_in' => 'content',
+ 'default' => '-',
+ 'value' => '-',
+ 'fake' => true]);
+
foreach ($translate->getStringToTranslate() as $string) {
$key = 't_' . base64_encode($string);