<?php /** * Created by Larakit. * Link: http://github.com/larakit * User: Alexey Berdnikov * Date: 19.05.16 * Time: 20:19 */ //регистрируем команду Larakit\Boot::register_command(\Larakit\CommandMakeValidator::class);
<?php /*################################################################################ //регистрируем сервис-провайдер ################################################################################*/ Larakit\Boot::register_middleware(Larakit\Page\PageMiddleware::class); Larakit\Boot::register_provider(\Larakit\Page\LarakitServiceProvider::class); Larakit\Boot::register_alias('LaraPage', 'Larakit\\Page\\Facade\\Page'); Larakit\Boot::register_alias('LaraPageHead', 'Larakit\\Page\\Facade\\PageHead'); //\Larakit\Widget\ManagerWidget::register(\Larakit\Widget\WidgetBreadcrumbs::class,''); \Larakit\Twig::register_function('larakit_page_h1', function ($route = null) { return LaraPage::pageH1($route); }); \Larakit\Twig::register_function('larakit_page_h1_ext', function ($route = null) { return LaraPage::pageH1Ext($route); }); \Larakit\Twig::register_function('larakit_page_title', function () { return LaraPage::getTitle(); }); \Larakit\Twig::register_function('larakit_page_breadcrumbs', function () { return LaraPage::getBreadCrumbs(); }); \Larakit\Twig::register_function('larakit_route_icons', function ($route = null) { return Larakit\Route\Route::routeIcons($route); }); //TITLE для страниц сайта //\Larakit\Event\Event::listener('lk-page::titles', function($event, $titles){ // return array_merge($titles, (array)trans('page.titles')); //}); //if(!function_exists('larakit_page_head')) { // function larakit_page_head() {
<?php if (!function_exists('laracss')) { function laracss() { return \Larakit\StaticFiles\Css::instance(); } } if (!function_exists('larajs')) { function larajs() { return \Larakit\StaticFiles\Js::instance(); } } //регистрируем сервис-провайдер Larakit\Boot::register_provider('Larakit\\StaticFiles\\LarakitServiceProvider'); if (class_exists('Larakit\\Twig')) { Larakit\Twig::register_function('larajs', function () { return \Larakit\StaticFiles\Js::instance(); }); Larakit\Twig::register_function('laracss', function () { return \Larakit\StaticFiles\Css::instance(); }); }
<?php //регистрируем сервис-провайдер Larakit\Boot::register_provider('TwigBridge\\ServiceProvider'); Larakit\Boot::register_alias('Twig', 'TwigBridge\\Facade\\Twig'); Larakit\Boot::register_command(\Larakit\Twig\CommandTwig::class); Larakit\Boot::register_command(\Larakit\Twig\CommandNsView::class); /*################################################################################ middlewares ################################################################################*/ \Larakit\Boot::register_middleware(\Larakit\Twig\MiddlewareTwig::class); //###################################################################### // регистрируем фильтры //###################################################################### Larakit\Twig::register_filter('upper', function ($text) { return mb_strtoupper($text); }); Larakit\Twig::register_filter('lower', function ($text) { return mb_strtolower($text); }); Larakit\Twig::register_filter('int', function ($text) { return (int) $text; }); //###################################################################### // регистрируем функции //###################################################################### \Larakit\Twig::register_function('env', function ($key, $default = null) { return env($key, $default); }); \Larakit\Twig::register_function('base64_decode', function ($data, $strict = null) { return base64_decode($data, $strict);
<?php //регистрируем провайдеры Larakit\Boot::register_command(\Larakit\Cmdvcs\CommandVcs::class); if (!function_exists('larasafepath')) { function larasafepath($path) { $path = str_replace(['\\', '/'], '/', $path); $base_path = str_replace(['\\', '/'], '/', base_path()); $path = str_replace($base_path, '', $path); return $path; } }
Larakit\Boot::register_alias('HtmlMap', Larakit\Html\Facades\Map::class); Larakit\Boot::register_alias('HtmlMeta', Larakit\Html\Facades\Meta::class); Larakit\Boot::register_alias('HtmlSpan', Larakit\Html\Facades\Span::class); Larakit\Boot::register_alias('HtmlStrike', Larakit\Html\Facades\Strike::class); Larakit\Boot::register_alias('HtmlStrong', Larakit\Html\Facades\Strong::class); Larakit\Boot::register_alias('HtmlSub', Larakit\Html\Facades\Sub::class); Larakit\Boot::register_alias('HtmlSup', Larakit\Html\Facades\Sup::class); Larakit\Boot::register_alias('HtmlTable', Larakit\Html\Facades\Table::class); Larakit\Boot::register_alias('HtmlTableRow', Larakit\Html\Facades\TableRow::class); Larakit\Boot::register_alias('HtmlTableRowCell', Larakit\Html\Facades\TableRowCell::class); Larakit\Boot::register_alias('HtmlLi', Larakit\Html\Facades\Li::class); Larakit\Boot::register_alias('HtmlLink', Larakit\Html\Facades\Link::class); Larakit\Boot::register_alias('HtmlUl', Larakit\Html\Facades\Ul::class); Larakit\Boot::register_alias('HtmlOl', Larakit\Html\Facades\Ol::class); Larakit\Boot::register_alias('HtmlVideo', Larakit\Html\Facades\Video::class); Larakit\Boot::register_alias('HtmlBase', Larakit\Html\Facades\Base::class); //###################################################################### // регистрируем функции //###################################################################### Larakit\Twig::register_function('html_progress', function () { return HtmlProgress::setContent(''); }); Larakit\Twig::register_function('html_map', function ($name, $id = null) { return \HtmlMap::setName($name)->setId($id ? $id : $name); }); Larakit\Twig::register_function('html_progress_bar', function () { return HtmlProgressBar::setContent(''); }); Larakit\Twig::register_function('html_a', function ($url) { return HtmlA::setHref($url)->setContent($url); });
<?php //регистрируем провайдеры Larakit\Boot::register_provider(\Larakit\Cmdbackup\LarakitServiceProvider::class);
<?php Larakit\Boot::register_provider(\Larakit\Makeup\LarakitServiceProvider::class); Larakit\Boot::register_middleware(\Larakit\Makeup\MakeupMiddleware::class); \Larakit\StaticFiles\Manager::package('larakit/lk-makeup')->usePackage('larakit/sf-bootstrap')->jsPackage('js/makeup.js')->cssPackage('css/makeup.css')->setSourceDir('public')->addExclude('*')->addExclude('makeup/frame*')->addInclude('makeup*'); \Larakit\Twig::register_global('MAKEUP_URL', env('MAKEUPDIR', '!/makeup'));
<?php //регистрируем рендер \HTML_QuickForm2_Renderer::register('larakit_form', Larakit\QuickForm\LaraFormRenderer::class, realpath(__DIR__ . '/QuickForm/LaraFormRenderer.php')); //регистрируем команду Larakit\Boot::register_command(\Larakit\QuickForm\CommandQuickformIde::class); Larakit\Boot::register_command(\Larakit\QuickForm\CommandQuickformMakeForm::class); Larakit\Boot::register_provider(\Larakit\QuickForm\LarakitServiceProvider::class); \Larakit\QuickForm\Register::container(Larakit\QuickForm\LaraForm::class); \Larakit\StaticFiles\Manager::package('pear/html_quickform2')->cssPackage('quickform.css')->jsPackage('js/quickform.js')->scopeInit('hierselect', ['/packages/pear/html_quickform2/js/quickform-hierselect.js'])->scopeInit('repeat', ['/packages/pear/html_quickform2/js/quickform-repeat.js'])->setSourceDir('data'); \Larakit\QuickForm\Register::register('button_link_twbs', 'qf_button_link_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('button_twbs', 'qf_button_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('checkbox_twbs', 'qf_checkbox_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('group_checkbox_twbs', 'qf_checkbox_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('group_checkbox_button_twbs', 'qf_checkbox_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('daterangepicker_twbs', 'qf_daterangepicker_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('datetime_twbs', 'qf_datetime_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('date_twbs', 'qf_date_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('time_twbs', 'qf_time_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('email_twbs', 'qf_email_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('group_twbs', 'qf_group_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('number_twbs', 'qf_number_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('password_twbs', 'qf_password_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('radio_twbs', 'qf_radio_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('group_radio_twbs', 'qf_group_radio_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('group_radio_button_twbs', 'qf_group_radio_button_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('select2_twbs', 'qf_select2_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('select_twbs', 'qf_select_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('static_twbs', 'qf_static_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('submit_twbs', 'qf_submit_twbs', __DIR__ . '/views'); \Larakit\QuickForm\Register::register('switch_twbs', 'qf_switch_twbs', __DIR__ . '/views');