31 $this->session = $session;
51 $ia = $this->session->getIgnoreAccess();
53 $this->session->setIgnoreAccess(
true);
55 $this->session->setIgnoreAccess(
false);
58 $ha = $this->session->getDisabledEntityVisibility();
60 $this->session->setDisabledEntityVisibility(
true);
62 $this->session->setDisabledEntityVisibility(
false);
65 $restore =
function () use ($ia, $ha) {
66 $this->session->setIgnoreAccess($ia);
67 $this->session->setDisabledEntityVisibility($ha);
71 $result = $this->dic->call($closure);
const ELGG_ENFORCE_ACCESS
const ELGG_HIDE_DISABLED_ENTITIES
const ELGG_IGNORE_ACCESS
elgg_call() flags
const ELGG_SHOW_DISABLED_ENTITIES
call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
__construct(ElggSession $session, PublicContainer $dic)
Constructor.