-
Notifications
You must be signed in to change notification settings - Fork 690
Expand file tree
/
Copy pathTemp.php
More file actions
56 lines (49 loc) · 1.03 KB
/
Temp.php
File metadata and controls
56 lines (49 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* @link https://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license https://craftcms.github.io/license/
*/
namespace craft\fs;
use Craft;
/**
* Temp represents a temporary filesystem.
*
* @author Pixel & Tonic, Inc. <[email protected]>
* @since 4.0.0
*/
class Temp extends Local
{
/**
* @inheritdoc
*/
public bool $hasUrls = false;
/**
* @inheritdoc
*/
public static function displayName(): string
{
return 'Temp';
}
/**
* @inheritdoc
*/
public function __construct($config = [])
{
// Config normalization
if (!isset($config['path'])) {
$config['path'] = Craft::$app->getPath()->getTempAssetUploadsPath();
}
if (!isset($config['name'])) {
$config['name'] = Craft::t('app', 'Temporary Uploads');
}
parent::__construct($config);
}
/**
* @inheritdoc
*/
public function getSettingsHtml(): ?string
{
return null;
}
}