Remove an ability from the model.

@param  mixed  $ability
@param  mixed|null  $model
@return \Silber\Bouncer\Conductors\RemovesAbilities|$this
11892
public function disallow($ability = null, $model = null)
    {
        if (is_null($ability)) {
            return new RemovesAbilities($this);
        }

        (new RemovesAbilities($this))->to($ability, $model);

        return $this;
    }
314469
public function unmention($model)
    {
        if (is_null($model)) {
            return;
        }

        if (is_string($model)) {
            $model = $this->mentionRepository->parse($model);
        }

        if ($model instanceof Model) {
            $this->mentionRepository->destroy($model);
            return $this;
        }

        if ($model instanceof Collection) {
            foreach ($model as $item) {
                $this->mentionRepository->destroy($item);
            }

            return $this;
        }

        return $this;
    }
768769
final public function delete($capability) {

        if ( array_key_exists($capability, $this->rpc_capabilities) ) {

            unset($this->rpc_capabilities[$capability]);

            $this->logger->debug("Deleted capability $capability");

            return true;

        } else {

            $this->logger->warning("Cannot delete capability $capability: entry not found");

            return false;

        }

    }
901062
public function remove($param)
    {
        if ( ! $this->isOpened()) {
            $this->start();
        }
        if (isset($this->attributes[$param])) {
            unset($this->attributes[$param]);
        }
        return $this;
    }
1257821
public function remove(DatagateAwareInterface $model, array $options = []) {
		if ($model->isEmpty()) {
			throw new Exceptions\OperationError('Model has no data');
		}
		
		if ($model instanceof Model) {
			return $this->removeModel($model, $options);
		}
		
		
		if ($model instanceof Collection) {
			return $this->removeCollection($model, $options);
		}
		
		throw new Exceptions\OperationError('Unknown instance of the "DatagateAwareInterface" was given: "' . get_class($model) . '"');
	}
202914
public function clearReusableForModel(Model $model) {
        $values = $this->_reusable;
        if(is_null($values)) {
            return;
        }
        $className = get_class($model);
        foreach($values as $key=>$value) {
            if(strpos($key, $className)===0) {
                unset($values[$key]);
            }
        }
        $this->_reusable = $values;
    }
43543
public function revertModel($model)
    {
        if (!$model->is_destroy) {
            $model->destroy();
        }
        $this->pool[$model->core_name]->push($model);
    }
1326130
public function can($ability, $model, $user = false)
    {
        if ($user === false) {
            $user = auth()->user();
        }

        $this->authorized = $user->can($ability, $model, $user);

        return $this;
    }
1192853
public function delete ($Model)
    {
        $entity   = $Model->getEntity();
        $entityId = $entity->getId();

        // Clear cache first
        if (isset($this->cache[$entityId])) {
            unset($this->cache[$entityId]);
        }

        $this->em->remove($entity);
        $this->em->flush();
    }
1352392
protected function isSpecificModelAbility(Model $ability)
    {
        return $ability->entity_type !== '*'
            && ! is_null($ability->entity_type)
            && ! is_null($ability->entity_id);
    }
41526
protected function doRemoveFunctionPhases(Skill $model, $data) {
		$errors = [];
		foreach ($data as $entry) {
			if (!isset($entry['id'])) {
				$errors[] = 'Missing id for FunctionPhase';
			} else {
				$related = FunctionPhaseQuery::create()->findOneById($entry['id']);
				$model->removeFunctionPhase($related);
			}
		}

		if (count($errors) > 0) {
			return new ErrorsException($errors);
		}
	}
666932
private function doCommitDelete(Model $model)
    {
        $this->dispatchLifecycleEvent(Events::preDelete, $model);

        $this->getPersisterFor($model->getType())->delete($model);
        $model->getState()->setDeleted();

        $this->dispatchLifecycleEvent(Events::postDelete, $model);
        return $model;
    }
122288
public function remove(DomainModel $model)
    {
        $this->getEntityManager()->remove($model);
        $this->getEntityManager()->flush();
    }
258454
protected function compileModelAbilityIdentifiers($ability, $model)
    {
        if ($model === '*') {
            return ["{$ability}-*", "*-*"];
        }

        $model = $model instanceof Model ? $model : new $model;

        $type = $model->getMorphClass();

        $abilities = [
            "{$ability}-{$type}",
            "{$ability}-*",
            "*-{$type}",
            "*-*",
        ];

        if ($model->exists) {
            $abilities[] = "{$ability}-{$type}-{$model->getKey()}";
            $abilities[] = "*-{$type}-{$model->getKey()}";
        }

        return $abilities;
    }
944473
public function remove($capability, $params = null)
    {
        $capability = Horde_String::upper($capability);

        if (is_null($params)) {
            unset($this->_data[$capability]);
        } elseif (isset($this->_data[$capability])) {
            if (!is_array($params)) {
                $params = array($params);
            }
            $params = array_map('Horde_String::upper', $params);

            $this->_data[$capability] = is_array($this->_data[$capability])
                ? array_diff($this->_data[$capability], $params)
                : array();

            if (empty($this->_data[$capability])) {
                unset($this->_data[$capability]);
            }
        }

        $this->notify();
    }
1179860
public function setOptionsFromModel($model)
    {
        if (!$model) {
            return $this;
        }

        if ($model->is_sortable && in_array($this->getField(), $model->getSortable())) {
            // The model dictates that this column should be sortable
            $this->setSortable(true);
        }

        $this->model = $model;

        return $this;
    }
1207992
public function define($ability, $callback)
    {
        if (is_callable($callback)) {
            $this->abilities[$ability] = $callback;
        } elseif (is_string($callback)) {
            $this->stringCallbacks[$ability] = $callback;

            $this->abilities[$ability] = $this->buildAbilityCallback($ability, $callback);
        } else {
            throw new InvalidArgumentException("Callback must be a callable or a 'Class@method' string.");
        }

        return $this;
    }