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(); }
/** * Returns the page's handle. * * @return string */ public function getCollectionHandle() { return parent::getCollectionHandle(); }