for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* TechDivision\Import\Attribute\Observers\AttributeCleanUpObserver
*
* NOTICE OF LICENSE
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* PHP version 5
* @author Tim Wagner <[email protected]>
* @copyright 2016 TechDivision GmbH <[email protected]>
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @link https://github.com/techdivision/import-attribute
* @link http://www.techdivision.com
*/
namespace TechDivision\Import\Attribute\Observers;
use TechDivision\Import\Attribute\Utils\ColumnKeys;
* Clean-Up after importing the EAV attribute row.
class AttributeCleanUpObserver extends AbstractAttributeImportObserver
{
* Process the observer's business logic.
* @return array The processed row
protected function process()
$this->addAttributeCodeIdMapping($this->getValue(ColumnKeys::ATTRIBUTE_CODE));
}
* Map's the passed attribute code to the attribute ID that has been created recently.
* @param string $attributeCode The attribute code that has to be mapped
* @return void
protected function addAttributeCodeIdMapping($attributeCode)
$this->getSubject()->addAttributeCodeIdMapping($attributeCode);