ldc-wenn-dann-mit-respekt/app/View/Components/ContentPart.php
2022-11-18 12:39:03 +01:00

39 lines
870 B
PHP

<?php
namespace App\View\Components;
use Illuminate\View\Component;
class ContentPart extends Component
{
private $part;
private $odd;
private $bgcolor;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct($part = null, $odd = 0, $bgcolor = null)
{
$this->part = null;
if($part != null)$this->part = $part;
$this->odd = $odd;
if($bgcolor != null) $this->bgcolor = $bgcolor;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
*/
public function render()
{
$part = $this->part;
$odd = $this->odd;
$bgcolor = $this->bgcolor;
return view('components.content-part', compact(['part', 'odd', 'bgcolor']));
}
}