function rollBackClassAttribute( $rollBackAction, $classAttributeId, $classId, $levelId, $attributeId, $type, $operation ) { if ( shouldRemove( $rollBackAction, $operation ) ) { removeClassAttributeWithId( $classAttributeId ); } elseif ( shouldRestore( $rollBackAction, $operation ) ) { addClassAttribute( $classId, $levelId, $attributeId, $type ); } }
public function add( IdStack $idPath, $record ) { $definedMeaningId = $idPath->getKeyStack()->peek( 0 )->definedMeaningId; $attributeLevelId = $record->classAttributeLevel; $attributeMeaningId = $record->classAttributeAttribute; $attributeType = $record->classAttributeType; if ( ( $attributeLevelId != 0 ) && ( $attributeMeaningId != 0 ) ) { addClassAttribute( $definedMeaningId, $attributeLevelId, $attributeMeaningId, $attributeType ); } }