Ejemplo n.º 1
0
    $types = explode(",", $opts->getOption("types"));
}
if (in_array("document", $types)) {
    $docTypes = null;
    if ($opts->getOption("documentTypes")) {
        $docTypes = explode(",", $opts->getOption("documentTypes"));
    }
    Pimcore_Cache_Tool_Warming::documents($docTypes);
}
if (in_array("asset", $types)) {
    $assetTypes = null;
    if ($opts->getOption("assetTypes")) {
        $assetTypes = explode(",", $opts->getOption("assetTypes"));
    }
    Pimcore_Cache_Tool_Warming::assets($assetTypes);
}
if (in_array("object", $types)) {
    $objectTypes = null;
    if ($opts->getOption("objectTypes")) {
        $objectTypes = explode(",", $opts->getOption("objectTypes"));
    }
    $classes = null;
    if ($opts->getOption("classes")) {
        $classes = explode(",", $opts->getOption("classes"));
    }
    Pimcore_Cache_Tool_Warming::objects($objectTypes, $classes);
}
// disable maintenance mode if requested
if ($opts->getOption("maintenanceMode")) {
    Pimcore_Tool_Admin::deactivateMaintenanceMode();
}
Ejemplo n.º 2
0
 public function maintenanceAction()
 {
     if ($this->_getParam("activate")) {
         Pimcore_Tool_Admin::activateMaintenanceMode();
     }
     if ($this->_getParam("deactivate")) {
         Pimcore_Tool_Admin::deactivateMaintenanceMode();
     }
     $this->_helper->json(array("success" => true));
 }