@param resource[] $active

@internal
555744
public function handle(array $active)
    {
        foreach ($active as $resource) {
            $id = (int) $resource;
            if (isset($this->sockets[$id], $this->pending[$id])) { // Event may have been removed from a previous call.
                if (!$this->sockets[$id]->isPersistent()) {
                    unset($this->pending[$id]);
                    if (isset($this->timers[$id])) {
                        $this->timers[$id]->stop();
                    }
                } elseif (isset($this->timers[$id])) {
                    $this->timers[$id]->again();
                }

                $this->sockets[$id]->call(false);
            }
        }
    }
489397
protected function filterActiveOptions(array $activeKeys, array &$availableOptions)
    {
        $active = [];
        foreach ($availableOptions as $id => $option) {
            if (!in_array($id, $activeKeys)) {
                continue;
            }

            $active[$id] = $option;
            unset($availableOptions[$id]);
        }

        return $active;
    }
296486
protected function move($resource, $movement)
    {
        $resource->setPosition($resource->getPosition() + $movement);

        // TODO use ResourceManager
        $event = $this->getOperator()->update($resource);
        $event->toFlashes($this->getFlashBag());
    }
747497
public function hasResource($resourceId)
    {
        if (array_key_exists($resourceId, $this->resources)) {
            return true;
        }

        if (!$this->resourceName->isSitesResourceId($resourceId)) {
            return false;
        }

        // @todo this can be made more efficient
        $resource = $this->getResource($resourceId);

        return ($resource !== null);
    }
1217228
protected function isChildActive($items, &$active)
    {
        foreach ($items as $i => $child) {
            if (is_array($child) && !ArrayHelper::getValue($child, 'visible', true)) {
                continue;
            }
            if (ArrayHelper::remove($items[$i], 'active', false) || $this->isItemActive($child)) {
                Html::addCssClass($items[$i]['options'], 'active');
                if ($this->activateParents) {
                    $active = true;
                }
            }
            $childItems = ArrayHelper::getValue($child, 'items');
            if (is_array($childItems)) {
                $activeParent = false;
                $items[$i]['items'] = $this->isChildActive($childItems, $activeParent);
                if ($activeParent) {
                    Html::addCssClass($items[$i]['options'], 'active');
                    $active = true;
                }
            }
        }
        return $items;
    }
1204929
private function makeParentActive($parent)
    {
        if (! is_null($parent)
            && method_exists($parent, 'activeParentage')
            && $parent->activeParentage()
        ) {
            $parent->setActive(true);
        }
    }
537987
public void setActive(boolean active) {
        super.setActive(active);
        if (active) {
            this.start = new AtomicLong(System.currentTimeMillis());
        } else {
            this.start =new AtomicLong( -1);
        }
    }
127664
public function setActive($active = true)
    {
        $this->active = (bool) $active;

        if ($active) {
            $this->setHtmlAttribute('class', 'active');
        }

        return $this;
    }
766816
public function setConnectionResource($resource): void
    {
        foreach ($this->items as $converter) {
            if ($converter instanceof ConnectionAware) {
                $converter->setConnectionResource($resource);
            }
        }
    }
1033470
public function move(ResourceActionEvent $event)
    {
        $resourceNode = $event->getResourceNode();
        $data = $event->getData();
        $parent = isset($data['destination']['autoId']) && isset($data['destination']['meta']['type']) && 'directory' === $data['destination']['meta']['type'] ?
            $this->manager->getById($data['destination']['autoId']) :
            null;

        if (!empty($parent)) {
            $movedResource = $this->manager->move($resourceNode, $parent);
            $event->setResponse(
                new JsonResponse($this->serializer->serialize($movedResource), 200)
            );
        } else {
            $event->setResponse(
                new JsonResponse(null, 500)
            );
        }
    }
1233681
public function setActive($active = true, $update_parents = true)
    {
        $this->data['active'] = $active;

        $method_name = $active ? 'add' : 'remove';
        $method_name .= $this->getActiveOnLinkOption() ? 'Link' : 'Item';
        $method_name .= 'Attribute';

        $this->$method_name('class', 'active');

        // Activate parents.
        if ($update_parents && !is_null($this->parent) && $active) {
            $this->parent()->setActive($active);
        }

        return $this;
    }
776251
public function checkQuery($fullUrlWithQuery,$active=null,$inactive=null)
    {
        $this->setReturnValue($active,$inactive);

        if (is_array($fullUrlWithQuery)) {
            $result = call_user_func_array(array($this,'queryIsDeeply'), $fullUrlWithQuery);
        } else {
            $result = $this->queryIsDeeply($fullUrlWithQuery);   
        }

        return $result ? $this->activeValue : $this->inActiveValue;
    }
395423
protected function buildActive(array $active)
    {
        $active[2] = array_merge_recursive(
            $active[2],
            ['class' => 'active']
        );
        $this->buildItem(count($this->stack), $active);
    }
622776
public function setSubscriptionCount($active, $inactive)
    {
        $this->_subscriptionCount['active'] = $active;
        $this->_subscriptionCount['inactive'] = $inactive;
        return $this;
    }
998808
public function translations($active = true)
    {
        if ($active) {
            return $this->hasMany(ContentTranslation::class)->where('is_active', '=', true);
        }
        return $this->hasMany(ContentTranslation::class);
    }
558517
public function flow($active)
    {
        list($class_id, $method_id, $args) = $this->protocolWriter->channelFlow($active);
        $this->send_method_frame(array($class_id, $method_id), $args);

        return $this->wait(array(
            $this->waitHelper->get_wait('channel.flow_ok')
        ), false, $this->channel_rpc_timeout);
    }
1192266
static public function setActiveId ($id)
    {
        $model = self::find($id);
        if ($model)
        {
            self::$active_model = $model;
        }
    }