forms/traits/CreateParams.php
2024-05-28 17:10:06 +03:00

24 lines
425 B
PHP
Executable File

<?php
namespace itguild\forms\form\traits;
trait CreateParams
{
/**
* @param array $data
* @return string
*/
public function createParams(array $data = []): string
{
$paramsString = "";
foreach($data as $key => $param){
if(is_string($param)){
$paramsString .= $key . "='" . $param . "'";
}
}
return $paramsString;
}
}