-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from mageplaza/2.3-develop
2.3 develop
- Loading branch information
Showing
8 changed files
with
357 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
namespace Mageplaza\Seo\Model\Config\Backend; | ||
|
||
use Magento\Config\Model\Config\Backend\Image; | ||
|
||
/** | ||
* Class BusinessImage | ||
* @package Mageplaza\Seo\Model\Config\Source | ||
*/ | ||
class BusinessImage extends Image | ||
{ | ||
/** | ||
* The tail part of directory path for uploading | ||
* | ||
*/ | ||
const UPLOAD_DIR = 'mageplaza/seo'; // Folder save image | ||
|
||
/** | ||
* Return path to directory for upload file | ||
* | ||
* @return string | ||
* @throw \Magento\Framework\Exception\LocalizedException | ||
*/ | ||
protected function _getUploadDir() | ||
{ | ||
return $this->_mediaDirectory->getAbsolutePath($this->_appendScopeInfo(self::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[] | ||
*/ | ||
protected function _getAllowedExtensions() | ||
{ | ||
return ['jpg', 'jpeg', 'png', 'svg']; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://www.mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_Seo | ||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | ||
* @license https://www.mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\Seo\Model\Config\Source; | ||
|
||
use Magento\Framework\Option\ArrayInterface; | ||
|
||
/** | ||
* Class BusinessType | ||
* @package Mageplaza\Seo\Model\Config\Source | ||
*/ | ||
class BusinessType implements ArrayInterface | ||
{ | ||
/** | ||
* @return array | ||
*/ | ||
public function toOptionArray() | ||
{ | ||
return [ | ||
['label' => __('Store'), 'value' => 'Store'], | ||
['label' => __('Local Business'), 'value' => 'LocalBusiness'], | ||
['label' => __('Auto Parts Store'), 'value' => 'AutoPartsStore'], | ||
['label' => __('Bike Store'), 'value' => 'BikeStore'], | ||
['label' => __('Book Store'), 'value' => 'BookStore'], | ||
['label' => __('Clothing Store'), 'value' => 'ClothingStore'], | ||
['label' => __('Computer Store'), 'value' => 'ComputerStore'], | ||
['label' => __('Convenience Store'), 'value' => 'ConvenienceStore'], | ||
['label' => __('Department Store'), 'value' => 'DepartmentStore'], | ||
['label' => __('Electronics Store'), 'value' => 'ElectronicsStore'], | ||
['label' => __('Florist Store'), 'value' => 'Florist'], | ||
['label' => __('Furniture Store'), 'value' => 'FurnitureStore'], | ||
['label' => __('Garden Store'), 'value' => 'GardenStore'], | ||
['label' => __('Grocery Store'), 'value' => 'GroceryStore'], | ||
['label' => __('Hardware Store'), 'value' => 'HardwareStore'], | ||
['label' => __('Hobby Shop'), 'value' => 'HobbyShop'], | ||
['label' => __('Home Goods Store'), 'value' => 'HomeGoodsStore'], | ||
['label' => __('Jewelry Store'), 'value' => 'JewelryStore'], | ||
['label' => __('Liquor Store'), 'value' => 'LiquorStore'], | ||
['label' => __('Mens Clothing Store'), 'value' => 'MensClothingStore'], | ||
['label' => __('Mobile Phone Store'), 'value' => 'MobilePhoneStore'], | ||
['label' => __('Movie Rental Store'), 'value' => 'MovieRentalStore'], | ||
['label' => __('Music Store'), 'value' => 'MusicStore'], | ||
['label' => __('Office Equipment Store'), 'value' => 'OfficeEquipmentStore'], | ||
['label' => __('Outlet Store'), 'value' => 'OutletStore'], | ||
['label' => __('Pawn Shop'), 'value' => 'PawnShop'], | ||
['label' => __('Pet Store'), 'value' => 'PetStore'], | ||
['label' => __('Shoe Store'), 'value' => 'ShoeStore'], | ||
['label' => __('Sporting Goods Store'), 'value' => 'SportingGoodsStore'], | ||
['label' => __('Tire Shop'), 'value' => 'TireShop'], | ||
['label' => __('Toy Store'), 'value' => 'ToyStore'], | ||
['label' => __('Wholesale Store'), 'value' => 'WholesaleStore'], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.