Skip to content

Commit

Permalink
Add string optimized collection
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Richter committed Oct 29, 2024
1 parent 421e30e commit 330298c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions Classes/Common/Collection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

/*
* This file is part of the Liszt Catalog Raisonne project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
*/

namespace Slub\LisztCommon\Common;

use Illuminate\Support\Collection as IlluminateCollection;
use Illuminate\Support\Str;

class Collection extends IlluminateCollection
{
public function join($glue, $finalGlue = '')
{
return Str::of(parent::join($glue, $finalGlue));
}

public function implode($value, $glue = null)
{
return Str::of(parent::implode($value, $glue));
}
}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"require": {
"typo3/cms-core": "^12",
"elasticsearch/elasticsearch": "^8",
"illuminate/collections": "^11"
"illuminate/collections": "^11",
"illuminate/support": "^11"
},
"require-dev": {
"phpstan/phpstan": "^1",
Expand Down
1 change: 0 additions & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
'SearchBar',
[ SearchController::class => 'searchBar' ],
[ SearchController::class => 'searchBar' ],

);

ExtensionManagementUtility::addPageTSConfig(
Expand Down

0 comments on commit 330298c

Please sign in to comment.