$val) { $attributes[] = sprintf( '%s="%s"', filter_var($key, FILTER_SANITIZE_URL), filter_var($val, FILTER_SANITIZE_FULL_SPECIAL_CHARS) ); } if (! array_key_exists('alt', $properties)) { $attributes[] = 'alt=""'; } if (! array_key_exists('class', $properties)) { $attributes[] = 'class="icon"'; } if (! array_key_exists('title', $properties) && $title !== null) { $attributes[] = 'title="' . htmlspecialchars($title) . '"'; } return sprintf( '', Url::fromPath('img/icons/' . $img), !empty($attributes) ? ' ' . implode(' ', $attributes) : '' ); } } // @codingStandardsIgnoreStart