class TestFileUsage

Same name in other branches
  1. 8.9.x core/modules/file/tests/src/Unit/LegacyFileTest.php \Drupal\Tests\file\Unit\TestFileUsage
  2. 8.9.x core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php \Drupal\service_provider_test\TestFileUsage
  3. 10 core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php \Drupal\service_provider_test\TestFileUsage
  4. 11.x core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php \Drupal\service_provider_test\TestFileUsage

Hierarchy

Expanded class hierarchy of TestFileUsage

File

core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php, line 8

Namespace

Drupal\service_provider_test
View source
class TestFileUsage extends FileUsageBase {
    
    /**
     * {@inheritdoc}
     */
    public function add(FileInterface $file, $module, $type, $id, $count = 1) {
    }
    
    /**
     * {@inheritdoc}
     */
    public function delete(FileInterface $file, $module, $type = NULL, $id = NULL, $count = 1) {
    }
    
    /**
     * {@inheritdoc}
     */
    public function listUsage(FileInterface $file) {
        return [];
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
FileUsageBase::$configFactory protected property The config factory.
FileUsageBase::__construct public function Creates a FileUsageBase object. 1
TestFileUsage::add public function Records that a module is using a file. Overrides FileUsageBase::add
TestFileUsage::delete public function Removes a record to indicate that a module is no longer using a file. Overrides FileUsageBase::delete
TestFileUsage::listUsage public function Determines where a file is used. Overrides FileUsageInterface::listUsage

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.