public static function RemoteFile::load in File URL 8
Same name and namespace in other branches
- 2.0.x src/Entity/RemoteFile.php \Drupal\file_url\Entity\RemoteFile::load()
Loads an entity.
Parameters
mixed $id: The id of the entity to load.
Return value
static|null The entity object or NULL if there is no entity with the given ID.
Overrides EntityBase::load
2 calls to RemoteFile::load()
- FileUrlHandler::urlToFile in src/
FileUrlHandler.php - Get the right file object from an URL.
- FileUrlWidget::process in src/
Plugin/ Field/ FieldWidget/ FileUrlWidget.php - Form API callback: Processes a file_generic field element.
File
- src/
Entity/ RemoteFile.php, line 33
Class
- RemoteFile
- Defines the remote file entity class.
Namespace
Drupal\file_url\EntityCode
public static function load($id) {
return parent::create([
'uri' => $id,
]);
}