ldc-nature-and-respect/app/View/Components/ContentPart.php
Vincent BRIDIER 9cd503affd
PHPCBF
2022-11-18 15:35:39 +01:00

45 lines
922 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']));
}
}