public function getFieldLayoutDefinition(FieldLayout $fieldLayout): array
    {
        if ($fieldLayout->getTabs()) {
            $tabDefinitions = [];

            foreach ($fieldLayout->getTabs() as $tab) {
                $tabDefinitions[$tab->name] = $this->getFieldLayoutFieldsDefinition($tab->getFields());
            }

            return [
                'type' => $fieldLayout->type,
                'tabs' => $tabDefinitions
            ];
        }

        return [
            'type' => $fieldLayout->type,
            'fields' => $this->getFieldLayoutFieldsDefinition($fieldLayout->getFields()),
        ];
    }