/** {@InheritDoc} */ public function beforeSave() { $before = parent::beforeSave(); if ($before) { $this->handlePhoto(); } return $before; }