NerdsAndCompany\Schematic\Services\Sections::getEntryTypeDefinitions PHP Метод

getEntryTypeDefinitions() приватный Метод

Get entry type definitions.
private getEntryTypeDefinitions ( array $entryTypes, $allowedEntryTypeIds ) : array
$entryTypes array
$allowedEntryTypeIds
Результат array
    private function getEntryTypeDefinitions(array $entryTypes, $allowedEntryTypeIds)
    {
        $entryTypeDefinitions = [];
        foreach ($entryTypes as $entryType) {
            if ($allowedEntryTypeIds === null || in_array($entryType->id, $allowedEntryTypeIds)) {
                $entryTypeDefinitions[$entryType->handle] = $this->getEntryTypeDefinition($entryType);
            }
        }
        return $entryTypeDefinitions;
    }