File: D:/HostingSpaces/ZelfVerkopen/zelfverkopen.nl/app/KommaApp/Kms/Core/Api/DynamicPageController.php
<?php
namespace App\KommaApp\Kms\Core\Api;
use App\KommaApp\Kms\Core\KmsController;
use App\KommaApp\Pages\Models\Page;
use App\KommaApp\Shop\Discounts\DiscountSection;
use Illuminate\Support\Facades\Lang;
use Illuminate\Support\Facades\View;
class DynamicPageController extends kmsController
{
protected $forModelName = Page::class;
private $translations = [];
public function __construct(DiscountSection $section)
{
parent::__construct($section);
$this->translations = Lang::get("kms/dynamic");
}
function twoColumnBlock()
{
return View::make('kms.attributes.dynamicTwoColumnBlock')->with("translations", $this->translations);
}
public function dynamicFullTextBlock()
{
return View::make('kms.attributes.dynamicFullTextBlock')->with("translations", $this->translations);
}
public function dynamicModelTextBlock()
{
return View::make('kms.attributes.dynamicModelTextBlock')->with("translations", $this->translations);
}
function dynamicVideoBlock()
{
return View::make('kms.attributes.dynamicVideoBlock')->with("translations", $this->translations);
}
function dynamicViewBlock()
{
$views = [
[
'value' => '',
'html' => 'Geen',
],
[
'value' => 'site.partials.calculationTool',
'html' => 'Berekentool',
],
[
'value' => 'site.partials.dynamic.courtageBlock',
'html' => 'Courtage blok',
],
];
return View::make('kms.attributes.dynamicViewBlock')
->with("translations", $this->translations)
->with('views', $views);
}
public function dynamicPageContentBlock()
{
$images = array();
$images['label'] = 'Afbeeldingen';
$images['max_images'] = 5;
$images['images'] = array();
$images['json'] = json_encode($images['images']);
return View::make('kms.attributes.dynamicPageContentBlock')->with('images', $images)->with("translations",
$this->translations);
}
public function dynamicFullImageBlock()
{
$images = array();
$images['label'] = 'Afbeeldingen';
$images['max_images'] = 1;
$images['images'] = array();
$images['json'] = json_encode($images['images']);
return View::make('kms.attributes.dynamicFullImageBlock')->with('images', $images)->with("translations",
$this->translations);
}
public function dynamicMultipleImagesBlock()
{
$images = array();
$images['label'] = 'Afbeeldingen';
$images['max_images'] = 1;
$images['images'] = array();
$images['json'] = json_encode($images['images']);
$secondaryImages = $images;
return View::make('kms.attributes.dynamicMultipleImagesBlock')->with('images', $images)->with('secondaryImages',
$images)->with("translations", $this->translations);
}
}