/** * @param ClassMetadata $meta * @param Component $component * @param object $entity * @return boolean */ public function save(ClassMetadata $meta, Component $component, $entity) { if (!$component instanceof \Venne\Security\DefaultType\PasswordContainer) { return false; } if (!$entity instanceof User) { return false; } if ($component->isPasswordSet()) { $entity->setPassword($component->getValue()); } return true; }