lib/Form/Type/ContentBrowserDynamicType.php
private function getEnabledItemTypes(array $itemTypes): array
    {
        $allItemTypes = array_flip(
            array_map(
                static function (Configuration $config): string {
                    return $config->getItemName();
                },
                $this->configRegistry->getConfigs()
            )
        );

        if (count($itemTypes) === 0) {
            return $allItemTypes;
        }

        return array_filter(
            $allItemTypes,
            static function (string $itemType) use ($itemTypes): bool {
                return in_array($itemType, $itemTypes, true);
            }
        );
    }
private function getEnabledItemTypes(array $itemTypes): array
    {
        $allItemTypes = array_flip(
            array_map(
                static function (Configuration $config): string {
                    return $config->getItemName();
                },
                $this->configRegistry->getConfigs()
            )
        );

        if (count($itemTypes) === 0) {
            return $allItemTypes;
        }

        return array_filter(
            $allItemTypes,
            static function (string $itemType) use ($itemTypes): bool {
                return in_array($itemType, $itemTypes, true);
            }
        );
    }
private function getEnabledItemTypes ( array $ itemTypes ) : array { $ allItemTypes = array_flip ( array_map ( static function ( Configuration $ config ) : string { return $ config -> getItemName ( ) ; } , $ this -> configRegistry -> getConfigs ( ) ) ) ; if ( count ( $ itemTypes ) === 0 ) { return $ allItemTypes ; } return array_filter ( $ allItemTypes , static function ( string $ itemType ) use ( $ itemTypes ) : bool { return in_array ( $ itemType , $ itemTypes , true ) ; } ) ; }
Returns the enabled item types based on provided list.
Returns the enabled item types based on provided list .