/** * This method is called in Object\\ClassDefinition::save() and is used to create the database table for the localized data * @param Object\ClassDefinition $class * @param mixed $params * @return void */ public function classSaved($class, $params = []) { // iterate over fieldDefinitions array and check if there is an item of type // object_Class_Data_KeyValue // if found, create the table, otherwise do nothing $keyValue = new Object\Data\KeyValue(); $keyValue->setClass($class); $fieldDefinitions = $class->getFieldDefinitions(); //TODO is this even called if type keyvalue not part of the class def? foreach ($fieldDefinitions as $definition) { if ($definition instanceof Object\ClassDefinition\Data\KeyValue) { Logger::debug("found definition of type keyvalue, create table"); $keyValue->createUpdateTable(); break; } } }