Example #1
0
 /**
  * @param \Concrete\Core\Page\Page $c
  */
 public function remove($c)
 {
     unset($this->items[array_search($c->getCollectionPath(), $this->items)]);
 }
Example #2
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 #3
0
 /**
  * Returns the path for the current page.
  *
  * @return string
  */
 public function getCollectionPath()
 {
     return parent::getCollectionPath();
 }