/**
* @return \Closure that will return the root config class
*/ publicfunctionbuild(ConfigurationInterface $configuration): \Closure { $this->classes = [];
$path = $this->getFullPath($rootClass); if(!is_file($path)){ // Generate the class if the file not exists
$this->classes[] = $rootClass; $this->buildNode($rootNode, $rootClass, $this->getSubNamespace($rootClass)); $rootClass->addImplements(ConfigBuilderInterface::class); $rootClass->addMethod('getExtensionAlias', '
public function NAME(): string
{
return \'ALIAS\';
}',
/**
* Organizes the flat, normalized filter items into a tree structure.
*
* @param array $root
* The root of the tree to build.
* @param array $items
* The normalized entity conditions and groups.
*
* @return \Drupal\jsonapi\Query\EntityConditionGroup
* The entity condition group
*/
/**
* Returns if the first run wizard should be loaded in the current backend instance
*
* @param stdClass $identity
*/ privatefunctionisFirstRunWizardEnabled($identity): bool { // Only admins can see the wizard
/**
* Processes an array of configurations.
*
* @param array $configs An array of configuration items to process
*/ publicfunctionprocessConfiguration(ConfigurationInterface $configuration, array $configs): array { return$this->process($configuration->getConfigTreeBuilder()->buildTree(), $configs); }
/**
* Normalizes a configuration entry.
*
* This method returns a normalize configuration array for a given key
* to remove the differences due to the original format (YAML and XML mainly).
*
* Here is an example.
*
* The configuration in XML:
*
* <twig:extension>twig.extension.foo</twig:extension>
* <twig:extension>twig.extension.bar</twig:extension>
*
* And the same configuration in YAML:
*
* extensions: ['twig.extension.foo', 'twig.extension.bar']
*
* @param array $config A config array
* @param string $key The key to normalize
* @param string|null $plural The plural form of the key if it is irregular
*/
$this->assertTrue($loader->supports('foo.php'), '->supports() returns true if the resource is loadable'); $this->assertFalse($loader->supports('foo.foo'), '->supports() returns false if the resource is not loadable'); $this->assertTrue($loader->supports('with_wrong_ext.yml', 'php'), '->supports() returns true if the resource with forced type is loadable'); }
/**
* Applies tags, metadata and conditions to secure an entity query.
*
* @param \Drupal\Core\Entity\Query\QueryInterface $query
* The query to be secured.
* @param string $entity_type_id
* An entity type ID.
* @param array $tree
* A tree of field specifiers in an entity query condition. The tree is a
* multi-dimensional array where the keys are field specifiers and the
* values are multi-dimensional array of the same form, containing only
* subsequent specifiers. @see ::buildTree().
* @param \Drupal\Core\Cache\CacheableMetadata $cacheability
* Collects cacheability for the query.
* @param string|null $field_prefix
* Internal use only. Contains a string representation of the previously
* visited field specifiers.
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_storage_definition
* Internal use only. The current field storage definition, if known.
*
* @see \Drupal\Core\Database\Query\AlterableInterface::addTag()
* @see \Drupal\Core\Database\Query\AlterableInterface::addMetaData()
* @see \Drupal\Core\Database\Query\ConditionInterface
*/