Skip to content

Commit

Permalink
ENH Add a status flag for companies that we can behat test against
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Nov 21, 2024
1 parent 5ca1ed5 commit 5c92057
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions code/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,15 @@ public function scaffoldSearchField()
return DropdownField::create('CompanyID', 'Company', Company::get()->map())->setEmptyString('');
}

public function getStatusFlags(bool $cached = true): array
{
$this->beforeExtending('updateStatusFlags', function (array &$flags) {
$flags['company-status-flag1'] = 'string-flag';
$flags['company-status-flag2'] = [
'title' => 'a flag with a title',
'text' => 'array-flag',
];
});
return parent::getStatusFlags($cached);
}
}

0 comments on commit 5c92057

Please sign in to comment.