@@ -87,6 +87,6 @@ |
||
| 87 | 87 | | |
| 88 | 88 | */ |
| 89 | 89 | |
| 90 | - 'attributes' => [], |
|
| 90 | + 'attributes' => [ ], |
|
| 91 | 91 | |
| 92 | 92 | ]; |
@@ -62,6 +62,6 @@ |
||
| 62 | 62 | | |
| 63 | 63 | */ |
| 64 | 64 | |
| 65 | - 'attributes' => [], |
|
| 65 | + 'attributes' => [ ], |
|
| 66 | 66 | |
| 67 | 67 | ]; |
@@ -8,10 +8,10 @@ |
||
| 8 | 8 | <?php $active = null; ?> |
| 9 | 9 | @foreach ($items as $label => $_tmp) |
| 10 | 10 | <?php |
| 11 | - if (is_null($active)) { |
|
| 12 | - $active = $label; |
|
| 13 | - } |
|
| 14 | - ?> |
|
| 11 | + if (is_null($active)) { |
|
| 12 | + $active = $label; |
|
| 13 | + } |
|
| 14 | + ?> |
|
| 15 | 15 | <li role="presentation" {!! ($active == $label) ? 'class="active"' : '' !!}><a href="#{{ md5($label) }}" aria-controls="{{ md5($label) }}" role="tab" data-toggle="tab">{{ $label }}</a></li> |
| 16 | 16 | @endforeach |
| 17 | 17 | </ul> |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (! function_exists('resources_url')) { |
|
| 3 | +if (!function_exists('resources_url')) { |
|
| 4 | 4 | function resources_url($path) |
| 5 | 5 | { |
| 6 | 6 | return '/packages/sleepingowl/default/'.$path; |
@@ -29,44 +29,44 @@ discard block |
||
| 29 | 29 | ->with('nestable'); |
| 30 | 30 | |
| 31 | 31 | PackageManager::add(\SleepingOwl\Admin\Display\DisplayDatatables::class) |
| 32 | - ->js(null, resources_url('js/datatables.min.js'), ['datatables']) |
|
| 32 | + ->js(null, resources_url('js/datatables.min.js'), [ 'datatables' ]) |
|
| 33 | 33 | ->with('datatables'); |
| 34 | 34 | |
| 35 | 35 | PackageManager::add(\SleepingOwl\Admin\Display\DisplayDatatablesAsync::class) |
| 36 | - ->js(null, resources_url('js/datatables.min.js'), ['datatables']) |
|
| 36 | + ->js(null, resources_url('js/datatables.min.js'), [ 'datatables' ]) |
|
| 37 | 37 | ->with('datatables'); |
| 38 | 38 | |
| 39 | 39 | PackageManager::add(\SleepingOwl\Admin\Form\Element\Image::class) |
| 40 | 40 | ->with('flow.js'); |
| 41 | 41 | |
| 42 | 42 | PackageManager::add('libraries') |
| 43 | - ->js(null, resources_url('js/libraries.js'), ['jquery']); |
|
| 43 | + ->js(null, resources_url('js/libraries.js'), [ 'jquery' ]); |
|
| 44 | 44 | |
| 45 | 45 | PackageManager::add('admin-default') |
| 46 | - ->js('AdminLTE', resources_url('libs/AdminLTE/js/app.min.js'), ['libraries', 'jquery']) |
|
| 47 | - ->js(null, resources_url('js/admin-default.js'), ['libraries', 'metisMenu', 'datatables', 'AdminLTE']) |
|
| 46 | + ->js('AdminLTE', resources_url('libs/AdminLTE/js/app.min.js'), [ 'libraries', 'jquery' ]) |
|
| 47 | + ->js(null, resources_url('js/admin-default.js'), [ 'libraries', 'metisMenu', 'datatables', 'AdminLTE' ]) |
|
| 48 | 48 | ->css(null, resources_url('css/common.css')); |
| 49 | 49 | |
| 50 | 50 | PackageManager::add('flow.js') |
| 51 | - ->js(null, resources_url('libs/flow.js/js/flow.min.js'), ['jquery']); |
|
| 51 | + ->js(null, resources_url('libs/flow.js/js/flow.min.js'), [ 'jquery' ]); |
|
| 52 | 52 | |
| 53 | 53 | PackageManager::add('bootbox.js') |
| 54 | - ->js(null, resources_url('libs/bootbox.js/js/bootbox.js'), ['jquery']); |
|
| 54 | + ->js(null, resources_url('libs/bootbox.js/js/bootbox.js'), [ 'jquery' ]); |
|
| 55 | 55 | |
| 56 | 56 | PackageManager::add('bootstrap') |
| 57 | - ->js(null, resources_url('libs/bootstrap/js/bootstrap.min.js'), ['jquery']) |
|
| 57 | + ->js(null, resources_url('libs/bootstrap/js/bootstrap.min.js'), [ 'jquery' ]) |
|
| 58 | 58 | ->css(null, resources_url('libs/bootstrap/css/bootstrap.min.css')); |
| 59 | 59 | |
| 60 | 60 | PackageManager::add('datatables') |
| 61 | - ->js(null, resources_url('libs/datatables/js/jquery.dataTables.min.js'), ['jquery', 'libraries']) |
|
| 61 | + ->js(null, resources_url('libs/datatables/js/jquery.dataTables.min.js'), [ 'jquery', 'libraries' ]) |
|
| 62 | 62 | ->css('dataTables-theme', resources_url('libs/datatables/css/dataTables.bootstrap.min.css')); |
| 63 | 63 | |
| 64 | 64 | PackageManager::add('datetimepicker') |
| 65 | - ->js(null, resources_url('libs/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'), ['jquery', 'libraries']) |
|
| 65 | + ->js(null, resources_url('libs/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'), [ 'jquery', 'libraries' ]) |
|
| 66 | 66 | ->css(null, resources_url('libs/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css')); |
| 67 | 67 | |
| 68 | 68 | PackageManager::add('ekko-lightbox') |
| 69 | - ->js(null, resources_url('libs/ekko-lightbox/js/ekko-lightbox.min.js'), ['jquery']); |
|
| 69 | + ->js(null, resources_url('libs/ekko-lightbox/js/ekko-lightbox.min.js'), [ 'jquery' ]); |
|
| 70 | 70 | |
| 71 | 71 | PackageManager::add('font-awesome') |
| 72 | 72 | ->css(null, resources_url('libs/font-awesome/css/font-awesome.min.css')); |
@@ -75,26 +75,26 @@ discard block |
||
| 75 | 75 | ->js(null, resources_url('libs/jquery/js/jquery.min.js')); |
| 76 | 76 | |
| 77 | 77 | PackageManager::add('metisMenu') |
| 78 | - ->js(null, resources_url('libs/metisMenu/js/metisMenu.min.js'), ['jquery', 'libraries']) |
|
| 78 | + ->js(null, resources_url('libs/metisMenu/js/metisMenu.min.js'), [ 'jquery', 'libraries' ]) |
|
| 79 | 79 | ->css(null, resources_url('libs/metisMenu/css/metisMenu.min.css')); |
| 80 | 80 | |
| 81 | 81 | PackageManager::add('moment') |
| 82 | - ->js(null, resources_url('libs/moment/js/moment-with-locales.min.js'), ['jquery']); |
|
| 82 | + ->js(null, resources_url('libs/moment/js/moment-with-locales.min.js'), [ 'jquery' ]); |
|
| 83 | 83 | |
| 84 | 84 | PackageManager::add('nestable') |
| 85 | 85 | ->css(null, resources_url('libs/nestable/css/jquery.nestable.css')) |
| 86 | - ->js(null, resources_url('libs/nestable/js/jquery.nestable.js'), ['jquery', 'libraries']); |
|
| 86 | + ->js(null, resources_url('libs/nestable/js/jquery.nestable.js'), [ 'jquery', 'libraries' ]); |
|
| 87 | 87 | |
| 88 | 88 | PackageManager::add('noty') |
| 89 | - ->js(null, resources_url('libs/noty/js/jquery.noty.packaged.min.js'), ['jquery']); |
|
| 89 | + ->js(null, resources_url('libs/noty/js/jquery.noty.packaged.min.js'), [ 'jquery' ]); |
|
| 90 | 90 | |
| 91 | 91 | PackageManager::add('select2') |
| 92 | - ->js(null, resources_url('libs/select2/js/select2.full.min.js'), ['jquery', 'libraries']) |
|
| 92 | + ->js(null, resources_url('libs/select2/js/select2.full.min.js'), [ 'jquery', 'libraries' ]) |
|
| 93 | 93 | ->css(null, resources_url('libs/select2/css/select2.min.css')); |
| 94 | 94 | |
| 95 | 95 | PackageManager::add('Sortable') |
| 96 | - ->js(null, resources_url('libs/Sortable/js/Sortable.min.js'), ['jquery']) |
|
| 97 | - ->js('jquery.binding', resources_url('libs/Sortable/js/jquery.binding.js'), ['Sortable']); |
|
| 96 | + ->js(null, resources_url('libs/Sortable/js/Sortable.min.js'), [ 'jquery' ]) |
|
| 97 | + ->js('jquery.binding', resources_url('libs/Sortable/js/jquery.binding.js'), [ 'Sortable' ]); |
|
| 98 | 98 | |
| 99 | 99 | /* |
| 100 | 100 | |-------------------------------------------------------------------------- |
@@ -103,11 +103,11 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | |
| 105 | 105 | WysiwygManager::register('ckeditor') |
| 106 | - ->js(null, '//cdn.ckeditor.com/4.5.7/standard/ckeditor.js', ['jquery']); |
|
| 106 | + ->js(null, '//cdn.ckeditor.com/4.5.7/standard/ckeditor.js', [ 'jquery' ]); |
|
| 107 | 107 | |
| 108 | 108 | WysiwygManager::register('tinymce') |
| 109 | - ->js(null, '//cdn.tinymce.com/4/tinymce.min.js', ['jquery']); |
|
| 109 | + ->js(null, '//cdn.tinymce.com/4/tinymce.min.js', [ 'jquery' ]); |
|
| 110 | 110 | |
| 111 | 111 | WysiwygManager::register('simplemde', new \SleepingOwl\Admin\Wysiwyg\MarkdownFilter()) |
| 112 | - ->js(null, '//cdn.jsdelivr.net/simplemde/latest/simplemde.min.js', ['jquery']) |
|
| 112 | + ->js(null, '//cdn.jsdelivr.net/simplemde/latest/simplemde.min.js', [ 'jquery' ]) |
|
| 113 | 113 | ->css(null, '//cdn.jsdelivr.net/simplemde/latest/simplemde.min.css'); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -Route::group(['as' => 'admin.', 'namespace' => 'SleepingOwl\Admin\Http\Controllers'], function () { |
|
| 3 | +Route::group([ 'as' => 'admin.', 'namespace' => 'SleepingOwl\Admin\Http\Controllers' ], function() { |
|
| 4 | 4 | Route::get('{adminModel}', [ |
| 5 | 5 | 'as' => 'model', |
| 6 | 6 | 'uses' => 'AdminController@getDisplay', |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function register($editorId, WysiwygFilterInterface $filter = null, $name = null) |
| 45 | 45 | { |
| 46 | - $config = config('sleeping_owl.wysiwyg.'.$editorId, []); |
|
| 46 | + $config = config('sleeping_owl.wysiwyg.'.$editorId, [ ]); |
|
| 47 | 47 | |
| 48 | 48 | $this->getFilters()->push( |
| 49 | 49 | $editor = new Editor($editorId, $name, $filter, $config) |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function getEditor($editorId) |
| 69 | 69 | { |
| 70 | - return $this->getFilters()->filter(function (WysiwygEditorInterface $editor) use ($editorId) { |
|
| 70 | + return $this->getFilters()->filter(function(WysiwygEditorInterface $editor) use ($editorId) { |
|
| 71 | 71 | return $editor->getId() == $editorId; |
| 72 | 72 | })->first(); |
| 73 | 73 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function loadEditor($editorId) |
| 86 | 86 | { |
| 87 | - if (! is_null($editor = $this->getEditor($editorId))) { |
|
| 87 | + if (!is_null($editor = $this->getEditor($editorId))) { |
|
| 88 | 88 | if ($editor->isUsed()) { |
| 89 | 89 | return true; |
| 90 | 90 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function applyFilter($editorId, $text) |
| 106 | 106 | { |
| 107 | - if (! is_null($editor = $this->getEditor($editorId))) { |
|
| 107 | + if (!is_null($editor = $this->getEditor($editorId))) { |
|
| 108 | 108 | return $editor->applyFilter($text); |
| 109 | 109 | } |
| 110 | 110 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function apply($text) |
| 16 | 16 | { |
| 17 | 17 | return Blade::compileString( |
| 18 | - preg_replace(['/<(\?|\%)\=?(php)?/', '/(\%|\?)>/'], ['', ''], $text) |
|
| 18 | + preg_replace([ '/<(\?|\%)\=?(php)?/', '/(\%|\?)>/' ], [ '', '' ], $text) |
|
| 19 | 19 | ); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | /** |
| 28 | 28 | * @var array |
| 29 | 29 | */ |
| 30 | - private $config = []; |
|
| 30 | + private $config = [ ]; |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * @var bool |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @param WysiwygFilterInterface|null $filter |
| 46 | 46 | * @param array $config |
| 47 | 47 | */ |
| 48 | - public function __construct($id, $name = null, WysiwygFilterInterface $filter = null, array $config = []) |
|
| 48 | + public function __construct($id, $name = null, WysiwygFilterInterface $filter = null, array $config = [ ]) |
|
| 49 | 49 | { |
| 50 | 50 | $this->id = $id; |
| 51 | 51 | $this->name = is_null($name) ? studly_case($id) : $name; |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | public function __call($method, $arguments) |
| 142 | 142 | { |
| 143 | - if (in_array($method, ['js', 'css'])) { |
|
| 144 | - call_user_func_array([$this->getPackage(), $method], $arguments); |
|
| 143 | + if (in_array($method, [ 'js', 'css' ])) { |
|
| 144 | + call_user_func_array([ $this->getPackage(), $method ], $arguments); |
|
| 145 | 145 | |
| 146 | 146 | return $this; |
| 147 | 147 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | $this->sort(); |
| 19 | 19 | |
| 20 | - if (! is_null($view)) { |
|
| 20 | + if (!is_null($view)) { |
|
| 21 | 21 | return view($view, [ |
| 22 | 22 | 'pages' => $this->getPages(), |
| 23 | 23 | ])->render(); |