Pimcore\Model\Object\ClassDefinition\Data\Fieldcollections::classSaved PHP Method

classSaved() public method

This method is called in Object|Class::save() and is used to create the database table for the localized data
public classSaved ( $class, $params = [] ) : void
return void
    public function classSaved($class, $params = [])
    {
        if (is_array($this->allowedTypes)) {
            foreach ($this->allowedTypes as $allowedType) {
                $definition = Object\Fieldcollection\Definition::getByKey($allowedType);
                if ($definition) {
                    $fieldDefinition = $definition->getFieldDefinitions();
                    foreach ($fieldDefinition as $fd) {
                        if (method_exists($fd, "classSaved")) {
                            if (!$fd instanceof Localizedfields) {
                                // defer creation
                                $fd->classSaved($class);
                            }
                        }
                    }
                }
            }
        }
    }