PHP code example of lemonmind / pimcore-simple-seo-bundle
1. Go to this page and download the library: Download lemonmind/pimcore-simple-seo-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lemonmind / pimcore-simple-seo-bundle example snippets
public function defaultAction(DocumentSeoMetaGenerator $seoMetaGenerator): Response
{
$seoMetaGenerator->generate($this->document);
return $this->render('default/default.html.twig');
}
public function seoObjectAction(ObjectSeoMetaGenerator $seoMetaGenerator): Response
{
/**
* @var ObjectSeoInterface $test
*/
$test = Test::getById(1);
$url = 'absolute url to this object';
$seoMetaGenerator->generate($test, $url);
return $this->render('default/default.html.twig');
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.