Skip to content

Commit

Permalink
Additional commit for CFM-394
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Dec 1, 2024
1 parent f86b04d commit 6fa22a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 3 additions & 1 deletion app/src/Lib/Traits/SearchFilterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,12 @@ public function getFilterConfig(): array {
* Obtain the set of permitted search attributes.
*
* @since COmanage Registry v5.0.0
* @param string $controller Controller name
* @param DateTimeZone $vv_tz Current time zone, if known
* @return array Array of permitted search attributes and configuration elements needed for display
*/

public function getSearchableAttributes(string $controller, string $vv_tz=null): array {
public function getSearchableAttributes(string $controller, \DateTimeZone $vv_tz=null): array {
$modelname = Inflector::classify(Inflector::underscore($controller));
$filterConfig = $this->getFilterConfig();

Expand Down
17 changes: 11 additions & 6 deletions app/src/Lib/Util/StringUtilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,19 @@ public static function classNameToForeignKey(string $className): string {
* Construct the Column human-readable key
*
* @since COmanage Registry v5.0.0
* @param string $modelsName The name of the Model
* @param string $c The name of the column
* @param string $tz The timezone
* @param boolean $useCustomClMdlLabel Whether to use a custom `Model.column` field entry or rely on the default
* @return string Column friendly name
* @param string $modelsName The name of the Model
* @param string $c The name of the column
* @param DateTimeZone $tz The timezone
* @param boolean $useCustomClMdlLabel Whether to use a custom `Model.column` field entry or rely on the default
* @return string Column friendly name
*/

public static function columnKey($modelsName, $c, $tz=null, $useCustomClMdlLabel=false): string {
public static function columnKey(
string $modelsName,
string $c,
\DateTimeZone $tz=null,
bool $useCustomClMdlLabel=false
): string {
if(strpos($c, "_id", strlen($c)-3)) {
$postfix = "";
if($c == "parent_id") {
Expand Down

0 comments on commit 6fa22a9

Please sign in to comment.