Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/image/src/Tests/ImageFieldTestBase.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
107 | 107 |
108 /** | 108 /** |
109 * Retrieves the fid of the last inserted file. | 109 * Retrieves the fid of the last inserted file. |
110 */ | 110 */ |
111 protected function getLastFileId() { | 111 protected function getLastFileId() { |
112 return (int) db_query('SELECT MAX(fid) FROM {file_managed}')->fetchField(); | 112 return (int) \Drupal::entityQueryAggregate('file')->aggregate('fid', 'max')->execute()[0]['fid_max']; |
113 } | 113 } |
114 | 114 |
115 } | 115 } |