Initial commit
This commit is contained in:
commit
08a8a71c55
631 changed files with 139902 additions and 0 deletions
46
public/kirby/src/Cms/UserBlueprint.php
Normal file
46
public/kirby/src/Cms/UserBlueprint.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
namespace Kirby\Cms;
|
||||
|
||||
/**
|
||||
* Extension of the basic blueprint class
|
||||
* to handle all blueprints for users.
|
||||
*
|
||||
* @package Kirby Cms
|
||||
* @author Bastian Allgeier <bastian@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://getkirby.com/license
|
||||
*/
|
||||
class UserBlueprint extends Blueprint
|
||||
{
|
||||
/**
|
||||
* UserBlueprint constructor.
|
||||
*
|
||||
* @throws \Kirby\Exception\InvalidArgumentException
|
||||
*/
|
||||
public function __construct(array $props)
|
||||
{
|
||||
// normalize and translate the description
|
||||
$props['description'] = $this->i18n($props['description'] ?? null);
|
||||
|
||||
// register the other props
|
||||
parent::__construct($props);
|
||||
|
||||
// normalize all available page options
|
||||
$this->props['options'] = $this->normalizeOptions(
|
||||
$this->props['options'] ?? true,
|
||||
// defaults
|
||||
[
|
||||
'create' => null,
|
||||
'changeEmail' => null,
|
||||
'changeLanguage' => null,
|
||||
'changeName' => null,
|
||||
'changePassword' => null,
|
||||
'changeRole' => null,
|
||||
'delete' => null,
|
||||
'update' => null,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue