Your IP : 216.73.217.13


Current Path : /home/rtorresani/www/vendor/magento/module-weee/Observer/
Upload File :
Current File : //home/rtorresani/www/vendor/magento/module-weee/Observer/UpdateElementTypesObserver.php

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\Weee\Observer;

use Magento\Framework\Event\ObserverInterface;

class UpdateElementTypesObserver implements ObserverInterface
{
    /**
     * Add custom element type for attributes form
     *
     * @param \Magento\Framework\Event\Observer $observer
     * @return $this
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $response = $observer->getEvent()->getResponse();
        $types = $response->getTypes();
        $types['weee'] = \Magento\Weee\Block\Element\Weee\Tax::class;
        $response->setTypes($types);
        return $this;
    }
}