Example #1
0
 public static function refresh(CorePage $c)
 {
     // takes a generated collection and refreshes it - updates its path, it's cDateModified
     // it's name, it's permissions
     if (!$c->isGeneratedCollection()) {
         return false;
     }
     $pkg = Package::getByID($c->getPackageID());
     $currentPath = $c->getCollectionPath();
     $pathToFile = static::getPathToNode($currentPath, $pkg);
     $txt = Loader::helper('text');
     $data = array();
     $data['cName'] = $txt->unhandle($c->getCollectionHandle());
     $data['cFilename'] = $pathToFile;
     $c->update($data);
     $env = Environment::get();
     $env->clearOverrideCache();
 }
Example #2
0
 /**
  * Checks if the page is a single page.
  *
  * @return bool
  */
 public function isGeneratedCollection()
 {
     return parent::isGeneratedCollection();
 }