Beispiel #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();
 }
 /**
  * Get the package ID for a page (page thats added by a package) (returns 0 if its not in a package).
  *
  * @return int
  */
 public function getPackageID()
 {
     return parent::getPackageID();
 }