Example #1
0
 /**
  * @param Model $caller
  */
 public function preSave($caller)
 {
     if (array_key_exists($this->_sourceField, $caller->getChangedData())) {
         $caller->{$this->_valueField} = Inflector::slugify($caller->getChangedData($this->_sourceField));
     }
 }