Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
    /**
     * 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;
    }