protected function buildSelectItemsFromAvailableTemplate($availableTemplates)
    {
        $newItems = [];
        $newItems['Use Default'] = ['Use Default', null];
        foreach ($availableTemplates as $availableTemplate) {
            $label = isset($availableTemplate['label']) ? $availableTemplate['label'] : '';
            $value = isset($availableTemplate['file']) ? $availableTemplate['file'] : '';
            $newItems[$label] = [$label, $value];
        }

        return $newItems;
    }
protected function buildSelectItemsFromAvailableTemplate($availableTemplates)
    {
        $newItems = [];
        $newItems['Use Default'] = ['Use Default', null];
        foreach ($availableTemplates as $availableTemplate) {
            $label = isset($availableTemplate['label']) ? $availableTemplate['label'] : '';
            $value = isset($availableTemplate['file']) ? $availableTemplate['file'] : '';
            $newItems[$label] = [$label, $value];
        }

        return $newItems;
    }
protected function buildSelectItemsFromAvailableTemplate ( $ availableTemplates ) { $ newItems = [ ] ; $ newItems [ 'Use Default' ] = [ 'Use Default' , null ] ; foreach ( $ availableTemplates as $ availableTemplate ) { $ label = isset ( $ availableTemplate [ 'label' ] ) ? $ availableTemplate [ 'label' ] : '' ; $ value = isset ( $ availableTemplate [ 'file' ] ) ? $ availableTemplate [ 'file' ] : '' ; $ newItems [ $ label ] = [ $ label , $ value ] ; } return $ newItems ; }
Returns the available templates as needed for the flexform.

@param array $availableTemplates
@return array
Returns the available templates as needed for the flexform .