Skip to content
Snippets Groups Projects
Unverified Commit 7bbceff8 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3478771 by phenaproxima, smustgrave, alexpott: InputConfigurator should...

Issue #3478771 by phenaproxima, smustgrave, alexpott: InputConfigurator should expose input data definitions

(cherry picked from commit 2ad947f2)
parent 9b2d5abf
No related branches found
No related tags found
2 merge requests!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #303602 passed with warnings
Pipeline: drupal

#303653

    Pipeline: drupal

    #303648

      Pipeline: drupal

      #303647

        +6
        ......@@ -5,6 +5,7 @@
        namespace Drupal\Core\Recipe;
        use Drupal\Core\TypedData\DataDefinition;
        use Drupal\Core\TypedData\TypedDataInterface;
        use Drupal\Core\TypedData\TypedDataManagerInterface;
        use Symfony\Component\Validator\Exception\ValidationFailedException;
        ......@@ -75,6 +76,19 @@ public function __construct(
        }
        }
        /**
        * Returns the typed data definitions for the inputs defined by this recipe.
        *
        * This does NOT return the data definitions for inputs defined by this
        * recipe's dependencies.
        *
        * @return \Drupal\Core\TypedData\DataDefinitionInterface[]
        * The typed data definitions, keyed by input name.
        */
        public function getDataDefinitions(): array {
        return array_map(fn (TypedDataInterface $data) => $data->getDataDefinition(), $this->data);
        }
        /**
        * Returns the collected input values, keyed by name.
        *
        ......@@ -98,9 +112,9 @@ public function describeAll(): array {
        foreach ($this->dependencies->recipes as $dependency) {
        $descriptions = array_merge($descriptions, $dependency->input->describeAll());
        }
        foreach ($this->data as $key => $data) {
        foreach ($this->getDataDefinitions() as $key => $definition) {
        $name = $this->prefix . '.' . $key;
        $descriptions[$name] = $data->getDataDefinition()->getDescription();
        $descriptions[$name] = $definition->getDescription();
        }
        return $descriptions;
        }
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment