Skip to content

Commit

Permalink
Merge pull request #890 from tractorcow-farm/7
Browse files Browse the repository at this point in the history
Merge branch '7' into 8
  • Loading branch information
emteknetnz authored Sep 18, 2024
2 parents 411f6a4 + fe20ba6 commit 8e41d7a
Show file tree
Hide file tree
Showing 6 changed files with 1,180 additions and 1,216 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/fluent.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/Extension/Traits/FluentObjectTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use SilverStripe\Forms\GridField\GridFieldConfig;
use SilverStripe\Forms\GridField\GridFieldConfig_Base;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldFilterHeader;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataQuery;
Expand Down Expand Up @@ -106,6 +107,8 @@ protected function updateFluentCMSFields(FieldList $fields)

// Generate gridfield for handling localisations
$config = GridFieldConfig_Base::create();
// Remove filters as the displayed data is in ArrayList format
$config->removeComponentsByType(GridFieldFilterHeader::class);

$columns = $config->getComponentByType(GridFieldDataColumns::class);
$summaryColumns = [
Expand Down
15 changes: 15 additions & 0 deletions src/Task/ConvertTranslatableTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use SilverStripe\Core\Convert;
use SilverStripe\Dev\BuildTask;
use SilverStripe\Dev\Debug;
use SilverStripe\Dev\Deprecation;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\Queries\SQLSelect;
Expand All @@ -31,6 +32,8 @@
* 3. Log into the CMS and set up the locales you want to use
* 4. Back up your DB again
* 5. Log into the CMS and check everything
*
* @deprecated 7.3.0 Will be removed without equivalent functionality to replace it
*/
class ConvertTranslatableTask extends BuildTask
{
Expand All @@ -40,6 +43,18 @@ class ConvertTranslatableTask extends BuildTask

private static $segment = 'ConvertTranslatableTask';

public function __construct()
{
parent::__construct();
Deprecation::withSuppressedWarning(function () {
Deprecation::notice(
'7.3.0',
'Will be removed without equivalent functionality to replace it',
Deprecation::SCOPE_CLASS
);
});
}

/**
* Checks that fluent is configured correctly
*
Expand Down
17 changes: 16 additions & 1 deletion src/Task/ConvertTranslatableTask/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@

namespace TractorCow\Fluent\Task\ConvertTranslatableTask;

use SilverStripe\Dev\Deprecation;

/**
* @deprecated 7.3.0 Will be removed without equivalent functionality to replace it
*/
class Exception extends \Exception
{

public function __construct()
{
parent::__construct();
Deprecation::withSuppressedWarning(function () {
Deprecation::notice(
'7.3.0',
'Will be removed without equivalent functionality to replace it',
Deprecation::SCOPE_CLASS
);
});
}
}
Loading

0 comments on commit 8e41d7a

Please sign in to comment.