src/Observers/AttributeOptionObserver.php
protected function prepareAttributes()
    {

        // load the attribute ID
        $attribute = $this->loadAttributeByEntityTypeIdAndAttributeCode($this->getEntityTypeId(), $this->getValue(ColumnKeys::ATTRIBUTE_CODE));
        $attributeId = $attribute[MemberNames::ATTRIBUTE_ID];

        // load the sort order
        $sortOrder = $this->getValue(ColumnKeys::SORT_ORDER);

        // return the prepared attribute option
        return $this->initializeEntity(
            array(
                MemberNames::ATTRIBUTE_ID  => $attributeId,
                MemberNames::SORT_ORDER    => $sortOrder
            )
        );
    }
protected function prepareAttributes()
    {

        // load the attribute ID
        $attribute = $this->loadAttributeByEntityTypeIdAndAttributeCode($this->getEntityTypeId(), $this->getValue(ColumnKeys::ATTRIBUTE_CODE));
        $attributeId = $attribute[MemberNames::ATTRIBUTE_ID];

        // load the sort order
        $sortOrder = $this->getValue(ColumnKeys::SORT_ORDER);

        // return the prepared attribute option
        return $this->initializeEntity(
            array(
                MemberNames::ATTRIBUTE_ID  => $attributeId,
                MemberNames::SORT_ORDER    => $sortOrder
            )
        );
    }
Prepare the attributes of the entity that has to be persisted.

@return array The prepared attributes