Loading src/UnicaenUtilisateur/Form/Role/RoleForm.php +10 −10 Original line number Diff line number Diff line Loading @@ -190,16 +190,16 @@ class RoleForm extends Form 'break_chain_on_failure' => true, ], ], [ 'name' => Regex::class, 'options' => [ 'pattern' => '/^[a-z0-9_-]+$/', 'messages' => [ Regex::NOT_MATCH => "Seuls les caractères suivants sont autorisés : [a-z, 0-9, _, -].", ], 'break_chain_on_failure' => true, ], ], // [ // 'name' => Regex::class, // 'options' => [ // 'pattern' => '/^[a-z0-9_-]+$/', // 'messages' => [ // Regex::NOT_MATCH => "Seuls les caractères suivants sont autorisés : [a-z, 0-9, _, -].", // ], // 'break_chain_on_failure' => true, // ], // ], [ 'name' => Callback::class, 'options' => [ Loading src/UnicaenUtilisateur/Form/Strategy/RoleParentStrategy.php +5 −2 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use Zend\Hydrator\Strategy\StrategyInterface; class RoleParentStrategy implements StrategyInterface { use RoleServiceAwareTrait; /** * {@inheritDoc} */ Loading @@ -16,6 +17,7 @@ class RoleParentStrategy implements StrategyInterface if (null != $value) { return $value->getId(); } return null; } Loading @@ -24,10 +26,11 @@ class RoleParentStrategy implements StrategyInterface */ public function hydrate($value) { if ($value !== null AND trim($value) !== '') { if (null != $value) { $parent = $this->roleService->find($value); return $parent; } return null; } } No newline at end of file Loading
src/UnicaenUtilisateur/Form/Role/RoleForm.php +10 −10 Original line number Diff line number Diff line Loading @@ -190,16 +190,16 @@ class RoleForm extends Form 'break_chain_on_failure' => true, ], ], [ 'name' => Regex::class, 'options' => [ 'pattern' => '/^[a-z0-9_-]+$/', 'messages' => [ Regex::NOT_MATCH => "Seuls les caractères suivants sont autorisés : [a-z, 0-9, _, -].", ], 'break_chain_on_failure' => true, ], ], // [ // 'name' => Regex::class, // 'options' => [ // 'pattern' => '/^[a-z0-9_-]+$/', // 'messages' => [ // Regex::NOT_MATCH => "Seuls les caractères suivants sont autorisés : [a-z, 0-9, _, -].", // ], // 'break_chain_on_failure' => true, // ], // ], [ 'name' => Callback::class, 'options' => [ Loading
src/UnicaenUtilisateur/Form/Strategy/RoleParentStrategy.php +5 −2 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use Zend\Hydrator\Strategy\StrategyInterface; class RoleParentStrategy implements StrategyInterface { use RoleServiceAwareTrait; /** * {@inheritDoc} */ Loading @@ -16,6 +17,7 @@ class RoleParentStrategy implements StrategyInterface if (null != $value) { return $value->getId(); } return null; } Loading @@ -24,10 +26,11 @@ class RoleParentStrategy implements StrategyInterface */ public function hydrate($value) { if ($value !== null AND trim($value) !== '') { if (null != $value) { $parent = $this->roleService->find($value); return $parent; } return null; } } No newline at end of file