Skip to content

Commit

Permalink
Fix an issue with Craft 4.4+ and source setting
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed May 9, 2023
1 parent 9329bbe commit 83e8093
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/fields/SingleCatField.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,18 @@ public static function elementType(): string

public ?int $branchLimit = 1;
public bool $showBlankOption = true;
public bool $allowMultipleSources = false;
public bool $allowLimit = false;

protected string $settingsTemplate = 'single-cat/field/settings';
protected string $inputTemplate = 'single-cat/field/input';
protected ?string $inputJsClass = null;
protected bool $sortable = false;


// Public Methods
// =========================================================================

public function init(): void
{
parent::init();

$this->allowLimit = false;
$this->allowMultipleSources = false;
$this->settingsTemplate = 'single-cat/field/settings';
$this->inputTemplate = 'single-cat/field/input';
$this->inputJsClass = false;
$this->sortable = false;
}

public function normalizeValue($value, ElementInterface $element = null): mixed
{
if (is_array($value)) {
Expand Down

0 comments on commit 83e8093

Please sign in to comment.