mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add files created from samir
This commit is contained in:
parent
69e7897fdd
commit
99a68091ae
30
src/Form/AssignRoleForm.php
Normal file
30
src/Form/AssignRoleForm.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// in src/Form/AssignRoleForm.php
|
||||
namespace App\Form;
|
||||
|
||||
use Cake\Form\Form;
|
||||
use Cake\Form\Schema;
|
||||
use Cake\Validation\Validator;
|
||||
|
||||
class AssignRoleForm extends Form
|
||||
{
|
||||
|
||||
protected function _buildSchema(Schema $schema)
|
||||
{
|
||||
return $schema->addField('role_id', ['type' => 'string']);
|
||||
}
|
||||
|
||||
function validationDefault(Validator $validator)
|
||||
{
|
||||
$validator->setProvider('custom', 'App\Model\Validation\GenericValidation');
|
||||
|
||||
return $validator;
|
||||
}
|
||||
|
||||
|
||||
protected function _execute(array $data)
|
||||
{
|
||||
// Send an email.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user