-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Expand file tree
/
Copy pathLogo.php
More file actions
46 lines (42 loc) · 952 Bytes
/
Logo.php
File metadata and controls
46 lines (42 loc) · 952 Bytes
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
<?php
/**
* Copyright 2016 Adobe
* All Rights Reserved.
*/
namespace Magento\Theme\Model\Design\Backend;
class Logo extends Image
{
/**
* The tail part of directory path for uploading
*
*/
const UPLOAD_DIR = 'logo';
/**
* Return path to directory for upload file
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
*/
protected function _getUploadDir()
{
return $this->_mediaDirectory->getRelativePath($this->_appendScopeInfo(static::UPLOAD_DIR));
}
/**
* Makes a decision about whether to add info about the scope.
*
* @return boolean
*/
protected function _addWhetherScopeInfo()
{
return true;
}
/**
* Getter for allowed extensions of uploaded files.
*
* @return string[]
*/
public function getAllowedExtensions()
{
return ['jpg', 'jpeg', 'gif', 'png'];
}
}