This commit is contained in:
Cüneyt Şentürk
2022-09-13 09:38:25 +03:00
parent d45305585d
commit d60c7a471b
11 changed files with 89 additions and 78 deletions

View File

@ -13,6 +13,8 @@ class Information extends Component
public const DEFAULT_TYPE = 'customer';
public const DEFAULT_PLURAL_TYPE = 'customers';
public $id;
public $document;
public $hideShow;
@ -23,22 +25,20 @@ class Information extends Component
public $placement;
public $id;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(
$document, bool $hideShow = false, string $showRoute = '', string $showDocumentRoute = '', string $placement = '', string $id = ''
string $id = '', $document, bool $hideShow = false, string $showRoute = '', string $showDocumentRoute = '', string $placement = ''
) {
$this->id = (! empty($id)) ? $id : 'tooltip-information-' . $document->id;
$this->document = $document;
$this->hideShow = $hideShow;
$this->showRoute = $this->getShowRoute($document->contact->type, $showRoute);
$this->showDocumentRoute = $this->getShowRoute($document->type, $showDocumentRoute);
$this->placement = (! empty($placement)) ? $placement : 'left';
$this->id = (! empty($id)) ? $id : 'tooltip-information-' . $document->id;
}
/**