File: D:/HostingSpaces/SBogers10/arborconsulting.komma.pro/app/KommaApp/Kms/Core/Attributes/Password.php
<?php
namespace App\KommaApp\Kms\Core\Attributes;
use App\KommaApp\Kms\Core\Attributes\Traits\LabelTrait;
use App\KommaApp\Kms\Core\Attributes\Traits\PlaceholderTextTrait;
use App\KommaApp\Kms\Core\Attributes\Traits\ReadOnlyTrait;
class Password extends Attribute
{
use PlaceholderTextTrait;
use ReadOnlyTrait;
/**
* @var string $labelText
*/
private $labelText = '';
/**
* @var string $repeatLabelText
*/
private $repeatLabelText = '';
/**
* Password constructor.
* @param string $password The text of the title
*/
public function __construct(string $password = '')
{
parent::__construct();
$this->setValue($password);
}
/**
* @return string The hashed password.
*/
public function getValue(): string
{
return \Hash::make($this->value);
}
/**
* Returns a view that visually represents this attribute
*
* @return \Illuminate\View\View
*/
public function render()
{
return \View::make('kms/attributes.password', [
'attribute' => $this
]);
}
/**
* @return string
*/
public function getLabelText()
{
return $this->labelText;
}
/**
* @param string $labelText
* @return $this
*/
public function setLabelText(string $labelText)
{
$this->labelText = $labelText;
return $this;
}
/**
* @return string
*/
public function getRepeatLabelText()
{
return $this->repeatLabelText;
}
/**
* @param string $repeatLabelText
* @return $this
*/
public function setRepeatLabelText(string $repeatLabelText)
{
$this->repeatLabelText = $repeatLabelText;
return $this;
}
}