function ImageFieldTestBase::getLastFileId
Retrieves the fid of the last inserted file.
File
-
core/
modules/ image/ src/ Tests/ ImageFieldTestBase.php, line 111
Class
- ImageFieldTestBase
- This class provides methods specifically for testing Image's field handling.
Namespace
Drupal\image\TestsCode
protected function getLastFileId() {
return (int) \Drupal::entityQueryAggregate('file')->aggregate('fid', 'max')
->execute()[0]['fid_max'];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.