protected function buildSelectorItems(array $tablesToIndex)
    {
        $selectorItems = [];

        foreach ($tablesToIndex as $configurationName => $tableName) {
            $icon = 'tcarecords-' . $tableName . '-default';
            if ($tableName === 'pages') {
                $icon = 'apps-pagetree-page-default';
            }

            $labelTableName = '';
            if ($configurationName != $tableName) {
                $labelTableName = ' (' . $tableName . ')';
            }

            $selectorItems[] = [$configurationName . $labelTableName, $configurationName, $icon];
        }

        return $selectorItems;
    }
protected function buildSelectorItems(array $tablesToIndex)
    {
        $selectorItems = [];

        foreach ($tablesToIndex as $configurationName => $tableName) {
            $icon = 'tcarecords-' . $tableName . '-default';
            if ($tableName === 'pages') {
                $icon = 'apps-pagetree-page-default';
            }

            $labelTableName = '';
            if ($configurationName != $tableName) {
                $labelTableName = ' (' . $tableName . ')';
            }

            $selectorItems[] = [$configurationName . $labelTableName, $configurationName, $icon];
        }

        return $selectorItems;
    }
protected function buildSelectorItems ( array $ tablesToIndex ) { $ selectorItems = [ ] ; foreach ( $ tablesToIndex as $ configurationName => $ tableName ) { $ icon = 'tcarecords-' . $ tableName . '-default' ; if ( $ tableName === 'pages' ) { $ icon = 'apps-pagetree-page-default' ; } $ labelTableName = '' ; if ( $ configurationName != $ tableName ) { $ labelTableName = ' (' . $ tableName . ')' ; } $ selectorItems [ ] = [ $ configurationName . $ labelTableName , $ configurationName , $ icon ] ; } return $ selectorItems ; }
Builds the items to render in the TCEforms select field.

@param array $tablesToIndex A map of indexing configuration to database tables

@return array Selectable items for the TCEforms select field
Builds the items to render in the TCEforms select field .