public function getFilterByIsChangedCallback( $source )
    {

        $changed = !( $source & self::CHANGED );
        $unchanged = !( $source & self::UNCHANGED );

        if( $changed and $unchanged ) {
            return function() {
                return false;
            };
        }

        if( !$changed and !$unchanged ) {
            return function() {
                return true;
            };
        }

        return function ($entity) use ( $changed ) {
            return $entity->isChanged() !== $changed;
        };

    }
public function getFilterByIsChangedCallback( $source )
    {

        $changed = !( $source & self::CHANGED );
        $unchanged = !( $source & self::UNCHANGED );

        if( $changed and $unchanged ) {
            return function() {
                return false;
            };
        }

        if( !$changed and !$unchanged ) {
            return function() {
                return true;
            };
        }

        return function ($entity) use ( $changed ) {
            return $entity->isChanged() !== $changed;
        };

    }
public function getFilterByIsChangedCallback ( $ source ) { $ changed = ! ( $ source & self :: CHANGED ) ; $ unchanged = ! ( $ source & self :: UNCHANGED ) ; if ( $ changed and $ unchanged ) { return function ( ) { return false ; } ; } if ( ! $ changed and ! $ unchanged ) { return function ( ) { return true ; } ; } return function ( $ entity ) use ( $ changed ) { return $ entity -> isChanged ( ) !== $ changed ; } ; }
Filter entities by their changed status.
@param bool $changed. Remove entities which are changed
@param bool $uchanged. Remove unchanged entities
@return $this
Filter entities by their changed status .