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()),
        ];
    }
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()),
        ];
    }
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 ( ) ) , ] ; }
Get field layout definition.

@param FieldLayout $fieldLayout

@return array
Get field layout definition .