Created
February 20, 2019 10:05
-
-
Save magevision/8552b3843f45f919dcda95860dc89494 to your computer and use it in GitHub Desktop.
AddCustomCategoryDisplayMode
This file contains hidden or 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
<?xml version="1.0"?> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | |
<type name="Magento\Catalog\Model\Category\Attribute\Source\Mode"> | |
<plugin name="magevision_blog38_category_attribute_source_mode" type="MageVision\Blog38\Plugin\Catalog\Model\Category\Attribute\Source\Mode"/> | |
</type> | |
</config> |
This file contains hidden or 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
<?php | |
namespace MageVision\Blog38\Plugin\Catalog\Model\Category\Attribute\Source; | |
class Mode | |
{ | |
/** | |
* @param \Magento\Catalog\Model\Category\Attribute\Source\Mode $subject | |
* @param $result | |
* @return array | |
*/ | |
public function afterGetAllOptions( | |
\Magento\Catalog\Model\Category\Attribute\Source\Mode $subject, | |
$result | |
) { | |
$result[] = ['value' => 'CUSTOM_MODE', 'label' => 'Custom Mode']; | |
return $result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment