63 lines
1.2 KiB
PHP
63 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\View\Components;
|
|
|
|
use Illuminate\View\Component;
|
|
|
|
class ContentPart extends Component
|
|
{
|
|
/**
|
|
* Part variable
|
|
*
|
|
* @var mixed
|
|
*/
|
|
private $part;
|
|
|
|
/**
|
|
* odd variable
|
|
*
|
|
* @var integer
|
|
*/
|
|
private $odd;
|
|
|
|
/**
|
|
* bgcolor variable
|
|
*
|
|
* @var mixed
|
|
*/
|
|
private $bgcolor;
|
|
|
|
/**
|
|
* Create a new component instance.
|
|
*
|
|
* @param mixed $part
|
|
* @param integer $odd
|
|
* @param mixed $bgcolor
|
|
* @return void
|
|
*/
|
|
public function __construct(mixed $part = null, int $odd = 0, mixed $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('fo.components.content-part', compact(['part', 'odd', 'bgcolor']));
|
|
}
|
|
}
|