public function DataFetcherTrait::getDataFetcher in Typed Data API enhancements 8
Gets the data fetcher.
Return value
\Drupal\typed_data\DataFetcherInterface The data fetcher.
File
- src/
DataFetcherTrait.php, line 36
Class
- DataFetcherTrait
- Helper for classes that need the data fetcher object.
Namespace
Drupal\typed_dataCode
public function getDataFetcher() {
if (empty($this->dataFetcher)) {
$this->dataFetcher = \Drupal::service('typed_data.data_fetcher');
}
return $this->dataFetcher;
}