How to set file usage on drupal 8?
Asked Answered
C

1

0

How do I set the file usage on Drupal 8? How can I use the following methods?

  • file_usage_add()
  • file_usage_delete()
  • file_usage_list()
Cleanthes answered 22/9, 2018 at 9:49 Comment(0)
M
1

You can use these methods in Drupal 8:

  1. File usage add: \Drupal::service('file.usage')->add
  2. File usage delete: \Drupal::service('file.usage')->delete
  3. File usage list: \Drupal::service('file.usage')->listUsage
Montpellier answered 22/9, 2018 at 13:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.