original_string: 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()),
          ];
      }
code: 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()),
          ];
      }
code_tokens: 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 ( ) ) , ] ; }
docstring: Get field layout definition.
  
  @param FieldLayout $fieldLayout
  
  @return array
docstring_tokens: Get field layout definition .