xpdo->config[xPDO::OPT_SETUP])) { $this->rebuildCache(); } return $saved; } /** * Overrides xPDOObject::save to cache the actionMap. * * {@inheritdoc} */ public function remove(array $ancestors = array()) { $removed = parent::remove($ancestors); if ($removed && empty($this->xpdo->config[xPDO::OPT_SETUP])) { $this->rebuildCache(); } return $removed; } /** * Rebuilds the action map cache. * * @see modCacheManager::generateActionMap * * @access public * @param array $options An array of options to pass to the cacheManager->generateActionMap method * @return boolean True if successful. */ public function rebuildCache(array $options = array()) { $rebuilt = false; $cacheKey= $this->xpdo->context->get('key') . '/actions'; $this->xpdo->getCacheManager(); if ($this->xpdo->cacheManager->generateActionMap($cacheKey, $options)) { $rebuilt = true; } return $rebuilt; } }