public function DataFetcherInterface::fetchDefinitionBySubPaths in Typed Data API enhancements 8
Fetches a data definition based upon the given sub-paths.
Parameters
\Drupal\Core\TypedData\DataDefinitionInterface $data_definition: The data definition from which to retrieve a nested definition.
string[] $sub_paths: A list of sub paths; i.e., a property path separated into its parts.
string $langcode: (optional) The language code used to get the argument value if the argument value should be translated. Defaults to NULL.
Return value
\Drupal\Core\TypedData\DataDefinitionInterface The data definition of the target.
Throws
\Drupal\typed_data\Exception\InvalidArgumentException Thrown if the given path is not valid for the given data; e.g., a not existing property is referenced.
1 method overrides DataFetcherInterface::fetchDefinitionBySubPaths()
- DataFetcher::fetchDefinitionBySubPaths in src/
DataFetcher.php - Fetches a data definition based upon the given sub-paths.
File
- src/
DataFetcherInterface.php, line 102
Class
- DataFetcherInterface
- Interface for the DataFetcher service.
Namespace
Drupal\typed_dataCode
public function fetchDefinitionBySubPaths(DataDefinitionInterface $data_definition, array $sub_paths, $langcode = NULL);