FEATURE: add shortcodes into binarity template
This commit is contained in:
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user