Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /** * Copyright Magento, Inc. All rights reserved. * See COPYING.txt for license ..

Decoded Output download

<?php
/**
 * Copyright  Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Catalog\Model\Indexer\Product\Eav\Plugin;

use Magento\Catalog\Model\Indexer\Product\Eav\Processor;
use Magento\Framework\Model\AbstractModel;
use Magento\Store\Model\ResourceModel\Store;

class StoreView
{
    /**
     * Product attribute indexer processor
     *
     * @var Processor
     */
    protected $_indexerEavProcessor;

    /**
     * @param Processor $indexerEavProcessor
     */
    public function __construct(Processor $indexerEavProcessor)
    {
        $this->_indexerEavProcessor = $indexerEavProcessor;
    }

    /**
     * Before save handler
     *
     * @param Store $subject
     * @param Store $result
     * @param AbstractModel $object
     *
     * @return Store
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function afterSave(Store $subject, Store $result, AbstractModel $object)
    {
        if (($object->isObjectNew() || $object->dataHasChangedFor('group_id')) && $object->getIsActive()) {
            $this->_indexerEavProcessor->markIndexerAsInvalid();
        }

        return $result;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * Copyright  Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Catalog\Model\Indexer\Product\Eav\Plugin;

use Magento\Catalog\Model\Indexer\Product\Eav\Processor;
use Magento\Framework\Model\AbstractModel;
use Magento\Store\Model\ResourceModel\Store;

class StoreView
{
    /**
     * Product attribute indexer processor
     *
     * @var Processor
     */
    protected $_indexerEavProcessor;

    /**
     * @param Processor $indexerEavProcessor
     */
    public function __construct(Processor $indexerEavProcessor)
    {
        $this->_indexerEavProcessor = $indexerEavProcessor;
    }

    /**
     * Before save handler
     *
     * @param Store $subject
     * @param Store $result
     * @param AbstractModel $object
     *
     * @return Store
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function afterSave(Store $subject, Store $result, AbstractModel $object)
    {
        if (($object->isObjectNew() || $object->dataHasChangedFor('group_id')) && $object->getIsActive()) {
            $this->_indexerEavProcessor->markIndexerAsInvalid();
        }

        return $result;
    }
}

Function Calls

None

Variables

None

Stats

MD5 adaa53d7bfad3f9ea7bc08a705c2661c
Eval Count 0
Decode Time 97 ms