Pimcore\Model\Object\ClassDefinition\Data\KeyValue::classSaved PHP Метод

classSaved() публичный Метод

This method is called in Object\\ClassDefinition::save() and is used to create the database table for the localized data
public classSaved ( ClassDefinition $class, mixed $params = [] ) : void
$class Pimcore\Model\Object\ClassDefinition
$params mixed
Результат 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;
            }
        }
    }