private function getUrlRow($loc, $changefreq = SitemapHelper::FREQUENCY_DAILY, $priority = 0.5, $lastmod = null) { $res = CHtml::openTag('url'); $res .= CHtml::tag('loc', [], htmlspecialchars($loc)); $res .= CHtml::tag('changefreq', [], $changefreq); $res .= CHtml::tag('priority', [], $priority); if ($lastmod) { $res .= CHtml::tag('lastmod', [], SitemapHelper::dateToW3C($lastmod)); } $res .= CHtml::closeTag('url'); return $res; }