public function render(array $links) { $html = ""; $urlHelper = $this->getView()->plugin('url'); foreach ($links as $key => $value) { if (!StringUtils::startsWith($value, 'http')) { $value = $urlHelper($value); } $html .= '<a href="' . $value . '" class="social fa fa-' . $key . '"></a>' . PHP_EOL; } return $html; }
public function testStartsWith() { $string = 'A string the check'; $check = StringUtils::startsWith($string, 'A'); $this->assertTrue($check); }