Skip to content

Commit

Permalink
ENH Add a status flag for companies that we can behat test against (#212
Browse files Browse the repository at this point in the history
)
  • Loading branch information
GuySartorelli authored Nov 26, 2024
1 parent 5ca1ed5 commit 7547c93
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 7547c93

Please sign in to comment.