diff --git a/app/CMS/Pipeline/DisplayPipeline/Process/CompileShortcodes.php b/app/CMS/Pipeline/DisplayPipeline/Process/CompileShortcodes.php index 1ef1d975..89809a2d 100644 --- a/app/CMS/Pipeline/DisplayPipeline/Process/CompileShortcodes.php +++ b/app/CMS/Pipeline/DisplayPipeline/Process/CompileShortcodes.php @@ -3,6 +3,7 @@ namespace App\CMS\Pipeline\DisplayPipeline\Process; use App\CMS\Contracts\Content\DisplayPipeline\Process; use App\Models\Content\Content; +use Webwizo\Shortcodes\Facades\Shortcode; class CompileShortcodes implements Process { /** @@ -14,6 +15,6 @@ class CompileShortcodes implements Process { */ function handle(Content & $page) { - // TODO: Implement handle() method. + $page->pageContent = Shortcode::compile($page->pageContent); } } \ No newline at end of file diff --git a/templates/Binarity/Handler.php b/templates/Binarity/Handler.php index 032aaea0..8b4e98e0 100644 --- a/templates/Binarity/Handler.php +++ b/templates/Binarity/Handler.php @@ -6,10 +6,7 @@ use App\Models\Content\Content; use App\Models\Module; use App\Models\User; use App\Models\Widgets\WidgetArea; -use Templates\Binarity\Shortcodes\DarkBlock; -use Templates\Binarity\Shortcodes\TechnologiesWrapper; -use Templates\Binarity\Shortcodes\Technology; -use Webwizo\Shortcodes\Facades\Shortcode; + class Handler implements TemplateHandler { @@ -85,37 +82,4 @@ class Handler implements TemplateHandler ], ]; } - - /** - * Prepare Content object to be rendered using Blade template - * - * @param Content $content - */ - public static function beforeRender(Content & $content) - { - Shortcode::register('technologies', TechnologiesWrapper::class); - Shortcode::register('tech', Technology::class); - Shortcode::register('dark', DarkBlock::class); - } - - /** - * Modify input data into format which can be understood by edit template - * - * @param Content $content - */ - public static function beforePopulatingEditForm(Content & $content) - { - } - - /** - * Slightly modify Content object before saving into database. - * - * This way we can do almost whatever we want - even in template - * - * @param Content $content - * @param $request - */ - public static function beforeSave(Content & $content, $inputData) - { - } } \ No newline at end of file diff --git a/templates/Binarity/Providers/BinarityServiceProvider.php b/templates/Binarity/Providers/BinarityServiceProvider.php new file mode 100644 index 00000000..63a5dd58 --- /dev/null +++ b/templates/Binarity/Providers/BinarityServiceProvider.php @@ -0,0 +1,22 @@ +
  • +420 775 323 455

  • -
  • © 2016 binarity s.r.o.
  • +
  • © {date('Y') binarity s.r.o.
  • diff --git a/templates/Binarity/config.php b/templates/Binarity/config.php index 40741a9c..5fecd89b 100644 --- a/templates/Binarity/config.php +++ b/templates/Binarity/config.php @@ -1,6 +1,6 @@ [], + 'providers' => [\Templates\Binarity\Providers\BinarityServiceProvider::class], 'files' => [], 'handler' => \Templates\Binarity\Handler::class, 'name' => 'binarity s.r.o.',