protected function FileDefinitionDiscovery::getSerializedDefinition in Libraries API 8.3
Gets the contents of the library file.
Parameters
$id: The library ID to retrieve the serialized definition for.
Return value
string The serialized library definition.
Throws
\Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException
Overrides FileDefinitionDiscoveryBase::getSerializedDefinition
File
- src/
ExternalLibrary/ Definition/ FileDefinitionDiscovery.php, line 32
Class
- FileDefinitionDiscovery
- Provides a libraries definition discovery using PHP's native file functions.
Namespace
Drupal\libraries\ExternalLibrary\DefinitionCode
protected function getSerializedDefinition($id) {
return file_get_contents($this
->getFileUri($id));
}