/** * Overrides xPDOObject::remove to cache the menus. * * {@inheritdoc} */ public function remove(array $ancestors = array()) { $removed = parent::remove($ancestors); if ($removed && empty($this->xpdo->config[xPDO::OPT_SETUP])) { $this->rebuildCache(); } return $removed; }
public function remove(array $ancestors = array()) { $removed = parent::remove($ancestors); if ($removed && !$this->getOption(xPDO::OPT_SETUP)) { $this->xpdo->call('modNamespace', 'clearCache', array(&$this->xpdo)); } return $removed; }
/** * Overrides xPDOObject::remove to fire modX-specific events * * {@inheritDoc} */ public function remove(array $ancestors = array()) { if ($this->xpdo instanceof modX) { $this->xpdo->invokeEvent('OnContextBeforeRemove',array( 'context' => &$this, 'ancestors' => $ancestors, )); } $removed = parent :: remove($ancestors); if ($removed && $this->xpdo instanceof modX) { $this->xpdo->invokeEvent('OnContextRemove',array( 'context' => &$this, 'ancestors' => $ancestors, )); } return $removed; }