TestFileUsage.php

Same filename in other branches
  1. 9 core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php
  2. 8.9.x core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php
  3. 10 core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php

Namespace

Drupal\service_provider_test

File

core/modules/system/tests/modules/service_provider_test/src/TestFileUsage.php

View source
<?php

declare (strict_types=1);
namespace Drupal\service_provider_test;

use Drupal\file\FileInterface;
use Drupal\file\FileUsage\FileUsageBase;
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 [];
    }

}

Classes

Title Deprecated Summary
TestFileUsage

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