library/Garp/Model/Behavior/FileRelatable.php
public function afterUpdate(array &$args) {
        foreach ($this->_affectedRows as $row) {
            foreach ($this->_newValues as $key => $value) {
                // compare the old and new values
                if ($row->$key != $value) {
                    $this->_deleteFile($row->$key);
                }
            }
        }
    }
public function afterUpdate(array &$args) {
        foreach ($this->_affectedRows as $row) {
            foreach ($this->_newValues as $key => $value) {
                // compare the old and new values
                if ($row->$key != $value) {
                    $this->_deleteFile($row->$key);
                }
            }
        }
    }
public function afterUpdate ( array & $ args ) { foreach ( $ this -> _affectedRows as $ row ) { foreach ( $ this -> _newValues as $ key => $ value ) { // compare the old and new values if ( $ row -> $ key != $ value ) { $ this -> _deleteFile ( $ row -> $ key ) ; } } } }
After update callback. Clear the files if the columns are modified.
We do this afterUpdate to make sure the update succeeded.
@param Array $args The new data is in $args[1]
@return Void
After update callback . Clear the files if the columns are modified . We do this afterUpdate to make sure the update succeeded .