original_string: public function getAvailableTemplateLayouts($pageUid)
      {
          $templateLayouts = [];
  
          // Check if the layouts are extended by ext_tables
          if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['dvoconnector']['templateLayouts'])
              && is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['dvoconnector']['templateLayouts'])
          ) {
              $templateLayouts = $GLOBALS['TYPO3_CONF_VARS']['EXT']['dvoconnector']['templateLayouts'];
          }
  
          // Add TsConfig values
          foreach ($this->getTemplateLayoutsFromTsConfig($pageUid) as $templateKey => $title) {
              if (GeneralUtility::isFirstPartOfStr($title, '--div--')) {
                  $optGroupParts = GeneralUtility::trimExplode(',', $title, true, 2);
                  $title = $optGroupParts[1];
                  $templateKey = $optGroupParts[0];
              }
              $templateLayouts[] = [$title, $templateKey];
          }
  
          return $templateLayouts;
      }
code: public function getAvailableTemplateLayouts($pageUid)
      {
          $templateLayouts = [];
  
          // Check if the layouts are extended by ext_tables
          if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['dvoconnector']['templateLayouts'])
              && is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['dvoconnector']['templateLayouts'])
          ) {
              $templateLayouts = $GLOBALS['TYPO3_CONF_VARS']['EXT']['dvoconnector']['templateLayouts'];
          }
  
          // Add TsConfig values
          foreach ($this->getTemplateLayoutsFromTsConfig($pageUid) as $templateKey => $title) {
              if (GeneralUtility::isFirstPartOfStr($title, '--div--')) {
                  $optGroupParts = GeneralUtility::trimExplode(',', $title, true, 2);
                  $title = $optGroupParts[1];
                  $templateKey = $optGroupParts[0];
              }
              $templateLayouts[] = [$title, $templateKey];
          }
  
          return $templateLayouts;
      }
code_tokens: public function getAvailableTemplateLayouts ( $ pageUid ) { $ templateLayouts = [ ] ; // Check if the layouts are extended by ext_tables if ( isset ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXT' ] [ 'dvoconnector' ] [ 'templateLayouts' ] ) && is_array ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXT' ] [ 'dvoconnector' ] [ 'templateLayouts' ] ) ) { $ templateLayouts = $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'EXT' ] [ 'dvoconnector' ] [ 'templateLayouts' ] ; } // Add TsConfig values foreach ( $ this -> getTemplateLayoutsFromTsConfig ( $ pageUid ) as $ templateKey => $ title ) { if ( GeneralUtility :: isFirstPartOfStr ( $ title , '--div--' ) ) { $ optGroupParts = GeneralUtility :: trimExplode ( ',' , $ title , true , 2 ) ; $ title = $ optGroupParts [ 1 ] ; $ templateKey = $ optGroupParts [ 0 ] ; } $ templateLayouts [ ] = [ $ title , $ templateKey ] ; } return $ templateLayouts ; }
docstring: Get available template layouts for a certain page
  
  @param int $pageUid
  @return array
docstring_tokens: Get available template layouts for a certain page