class ContentTypesParser extends BaseParser (View source)

Properties

protected FileLocator $fileLocator from  BaseParser
protected PathResolver $pathResolver from  BaseParser
protected string $initialFilename from  BaseParser
protected string[] $parsedFilenames from  BaseParser

Methods

__construct(string $projectDir, Collection $generalConfig, string $defaultLocale, string|null $locales = null, string $filename = 'contenttypes.yaml')

No description

Collection
parseConfigYaml(string $filename, bool $ignoreMissing = false)

Read and parse a YAML configuration file.

array
getParsedFilenames()

No description

getInitialFilename()

No description

getFilenameLocalOverrides()

No description

Collection
parse()

Read and parse the contenttypes.yml configuration file.

ContentType|null
parseContentType($key, array $contentType)

Parse a single Content Type configuration array.

array
parseFieldsAndGroups(array $fields)

Parse a Content Type's field and determine the grouping.

Details

__construct(string $projectDir, Collection $generalConfig, string $defaultLocale, string|null $locales = null, string $filename = 'contenttypes.yaml')

Parameters

string $projectDir
Collection $generalConfig
string $defaultLocale
string|null $locales
string $filename

protected Collection parseConfigYaml(string $filename, bool $ignoreMissing = false)

Read and parse a YAML configuration file.

If filename doesn't exist and/or isn't readable, we attempt to locate it in our config folder. This way you can pass in either an absolute filename or simply 'menu.yaml'.

Parameters

string $filename
bool $ignoreMissing

Return Value

Collection

array getParsedFilenames()

Return Value

array

getInitialFilename()

getFilenameLocalOverrides()

Collection parse()

Read and parse the contenttypes.yml configuration file.

Return Value

Collection

Exceptions

ConfigurationException

protected ContentType|null parseContentType($key, array $contentType)

Parse a single Content Type configuration array.

Parameters

$key
array $contentType

Return Value

ContentType|null

Exceptions

ConfigurationException

protected array parseFieldsAndGroups(array $fields)

Parse a Content Type's field and determine the grouping.

Parameters

array $fields

Return Value

array

Exceptions

ConfigurationException