示例#1
0
 /**
  * Enter description here ...
  * @param Morphes_Db_Model_Object $object
  * @param array $values
  * @param array $options
  */
 protected function _processReplicationUpdate($object, $values, $options)
 {
     $object->setId($values['id'])->setGlobalId($values['global_id'])->setStoreId($values['store_id'])->setData('_m_prevent_replication', true);
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_IS_ENABLED)) {
         $object->setIsEnabled($values['is_enabled']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_DISPLAY)) {
         $object->setDisplay($values['display']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_NAME)) {
         $object->setName($values['name']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_IS_ENABLED_IN_SEARCH)) {
         $object->setIsEnabledInSearch($values['is_enabled_in_search']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_POSITION)) {
         $object->setPosition($values['position']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_SORT_METHOD)) {
         $object->setSortMethod($values['sort_method']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_OPERATION)) {
         $object->setOperation($values['operation']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_IS_REVERSE)) {
         $object->setIsReverse($values['is_reverse']);
     }
 }
示例#2
0
 /**
  * Enter description here ...
  * @param Morphes_Db_Model_Object $object
  * @param array $values
  * @param array $options
  */
 protected function _processReplicationUpdate($object, $values, $options)
 {
     $object->setId($values['id'])->setOptionId($values['option_id'])->setFilterId($values['filter_id'])->setValueId($values['value_id'])->setData('_m_prevent_replication', true);
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2_Value::DM_NAME)) {
         $object->setName($values['name']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2_Value::DM_POSITION)) {
         $object->setPosition($values['position']);
     }
 }
示例#3
0
 /**
  * Enter description here ...
  * @param Morphes_Db_Model_Object $object
  * @param array $values
  * @param array $options
  */
 protected function _processReplicationUpdate($object, $values, $options)
 {
     $object->setId($values['id'])->setCode($values['code'])->setType($values['type'])->setData('_m_prevent_replication', true);
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_IS_ENABLED)) {
         $object->setIsEnabled($values['is_enabled']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_DISPLAY)) {
         $object->setDisplay(Mage::helper('morphes_db')->getLatestConfig('morphes_filters/display/' . $object->getType()));
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_NAME)) {
         $object->setName($values['name']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_IS_ENABLED_IN_SEARCH)) {
         $object->setIsEnabledInSearch($values['is_enabled_in_search']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_POSITION)) {
         $object->setPosition($values['position']);
     }
     if (!Mage::helper('morphes_db')->hasOverriddenValue($object, $values, Morphes_Filters_Resource_Filter2::DM_SORT_METHOD)) {
         $object->setSortMethod(Mage::helper('morphes_db')->getLatestConfig('morphes_filters/display/sort_method'));
     }
 }