| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
🔧 Sitemap generator component
This componenet automaticaly generates sitemap from annotated presenter actions. Found actions are cached to improve performance.
Install package using composer
composer require nepttune/sitemap
services:
- Nepttune\Component\ISitemapFactory
You can optionaly provide configuration array and enable hreflang links to be included for each entry (Requires translator in presenter).
parameters:
sitemap:
hreflang: true
services:
sitemapFactory:
implement: Nepttune\Component\ISitemapFactory
arguments:
- '%sitemap%'
class ExamplePresenter implements IPresenter, ISitemap
{
use TSitemap;
/** @var \Nepttune\Component\ISitemapFactory */
protected $iSitemapFactory;
public function __construct(\Nepttune\Component\ISitemapFactory $ISitemapFactory)
{
$this->iSitemapFactory = $ISitemapFactory;
}
public function actionSitemap()
{
$this->getHttpResponse()->setContentType('application/xml');
}
/**
* @sitemap
*/
public function actionExample()
{
}
protected function createComponentSitemap()
{
return $this->iSitemapFactory->create();
}
}
| Back | FazBrowse Home | New Git URL |