udpate
This commit is contained in:
40
override/modules/ph_simpleblog/controllers/front/author.php
Normal file
40
override/modules/ph_simpleblog/controllers/front/author.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
|
||||
*
|
||||
* @author Jpresta
|
||||
* @copyright Jpresta
|
||||
* @license See the license of this module in file LICENSE.txt, thank you.
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements getJprestaModelObjectClassName() and getJprestaModelObjectId() to enable the HTML cache provided by the
|
||||
* module Page Cache Ultimate created by jpresta.com
|
||||
*/
|
||||
class PH_SimpleBlogAuthorModuleFrontControllerOverride extends PH_SimpleBlogAuthorModuleFrontController
|
||||
{
|
||||
/**
|
||||
* @return string The ObjectModel class name to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
|
||||
*/
|
||||
public static function getJprestaModelObjectClassName()
|
||||
{
|
||||
return 'SimpleBlogPostAuthor';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null The ID of the current ObjectModel (if any) to be used by Page Cache Ultimate module to refresh the cache of pages generated by this controller
|
||||
*/
|
||||
public function getJprestaModelObjectId()
|
||||
{
|
||||
$id = null;
|
||||
$simpleBlogAuthor = SimpleBlogPostAuthor::getByRewrite(Tools::getValue('rewrite'));
|
||||
if (Validate::isLoadedObject($simpleBlogAuthor)) {
|
||||
$id = $simpleBlogAuthor->id;
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user