udpate
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
/**
|
||||
* This override is disabled by default because the views 'count' is updated each time and so clears the cache is soon as it is created.
|
||||
* To work, this count should be disabled or directly done with an SQL query without using the ObjectModel function 'update'.
|
||||
*/
|
||||
class EverPsBlogcategoryModuleFrontControllerOverride extends EverPsBlogcategoryModuleFrontController
|
||||
{
|
||||
/**
|
||||
* @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 'EverPsBlogCategory';
|
||||
}
|
||||
|
||||
/**
|
||||
* @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_object = (int)Tools::getValue('id_ever_category');
|
||||
if ($id_object && ($postObj = new EverPsBlogCategory($id_object)) && Validate::isLoadedObject($postObj)) {
|
||||
return $id_object;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user