Hide the discussion.

@param User $actor
@return $this
15039
public function hide(User $actor = null)
    {
        if (! $this->hidden_at) {
            $this->hidden_at = Carbon::now();
            $this->hidden_user_id = $actor ? $actor->id : null;

            $this->raise(new Hidden($this));
        }

        return $this;
    }
1236185
public function conceal($org, $user)
	{
		// Build the request path.
		$path = '/orgs/' . $org . '/public_members/' . $user;

		return $this->processResponse(
			$this->client->delete($this->fetchUrl($path)),
			204
		);
	}
282825
public function findOrFail($id, User $actor = null)
    {
        $query = Group::where('id', $id);

        return $this->scopeVisibleTo($query, $actor)->firstOrFail();
    }
1000864
public function dispatchEventsFor($entity, User $actor = null)
    {
        foreach ($entity->releaseEvents() as $event) {
            $event->actor = $actor;

            $this->events->dispatch($event);
        }
    }
1237308
public function revokeAccess($object, UserInterface $user, $permission = Permissions::PERMISSIONS_VIEW)
    {
        $objectIdentity = $this->getObjectIdentity($object);
        try {
            $acl = $this->aclProvider->findAcl($objectIdentity);
        } catch (AclNotFoundException $e) {
            // nothing to do
            return $this;
        }

        $securityIdentity = UserSecurityIdentity::fromAccount($user);
        $mask = $this->getMask($permission);

        foreach ($acl->getObjectAces() as $i => $ace) {
            /** @var EntryInterface $ace */
            if ($securityIdentity->equals($ace->getSecurityIdentity())) {
                $this->revokeMask($i, $acl, $ace, $mask);
            }
        }

        $this->aclProvider->updateAcl($acl);

        return $this;
    }
1202046
public function addBlocker($actor)
    {
        //if A blocks B, then A must remove B as a follower
        //need to keep track of this since the mixin is a singleton
        $person = $this->_mixer;

        if ($person->eql($actor)) {
            return false;
        }

        $person->removeFollower($actor);

        $actor->removeFollower($person);

        //just in case
        $person->removeRequester($actor);

        $actor->removeRequester($person);

        $edge = $this->getService('repos:actors.block')->findOrAddNew(array(
                'blocker' => $actor,
                'blocked' => $person,
            ));

        $edge->save();

        $this->resetStats(array($actor, $person));

        return $edge;
    }
396580
private function createDeleteForm(BaseActor $actor)
    {
        return $this->createFormBuilder()
            ->setAction($this->generateUrl('core_baseactor_delete', array('id' => $actor->getId())))
            ->setMethod('DELETE')
            ->getForm()
        ;
    }
294435
public function removeUserRole($user, $role)
    {
        $user   =   $this->findUserById($user);
        $role   =   $this->findRoleByKey($role);

        if ($user->not($role->key)) {
            return true;
        }

        return $user->leave($role);
    }
63321
public function removeMyFriend(\CsnUser\Entity\User $user)
    {
        $user->removeFriendWithMe($this); // synchronously updating inverse side.
        $this->myFriends->removeElement($user);

        return $this;
    }
1228725
public function getLeadCommand($actor, $person)
    {
        if (!$actor->isFollowable() || !$person->isLeadable()) {
            return;
        }

        if ($actor->eql($person)) {
            return;
        }

        if ($actor->blocking($person)) {
            return;
        }

        if ($person->following($actor) && $actor->authorize('administration')) {
            $command = $this->getCommand('lead', array('receiver' => $person, 'actor' => $actor, 'action' => 'unlead'));
            $command->name = 'unlead';
        } elseif (!$person->following($actor) && $actor->authorize('lead')) {
            $command = $this->getCommand('lead', array('receiver' => $person, 'actor' => $actor, 'action' => 'lead'));
            $command->name = 'lead';
        } else {
            return;
        }

        return $command;
    }
90474
void stop(final Actor actor) {
    final Actor removedActor = directory.remove(actor.address());

    if (actor == removedActor) {
      removedActor.lifeCycle.stop(actor);
    }
  }
981613
public function prune($user = null)
    {
        if ($user) {
            $this->addUsingAlias(UserTableMap::COL_ID, $user->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
81105
public function getVoidStatement(Actor $actor): self
    {
        return new Statement(
            null,
            $actor,
            Verb::createVoidVerb(),
            $this->getStatementReference()
        );
    }
923068
public function setLastPostedDiscussion(Discussion $discussion)
    {
        $this->last_posted_at = $discussion->last_posted_at;
        $this->last_posted_discussion_id = $discussion->id;
        $this->last_posted_user_id = $discussion->last_posted_user_id;

        return $this;
    }
1265912
public function findOrFail($id, User $actor = null)
    {
        return $this->queryVisibleTo($actor)->findOrFail($id);
    }
243862
public void hide (Action action) {
		Stage stage = getStage();
		if (stage != null) {
			removeListener(focusListener);
			if (previousKeyboardFocus != null && previousKeyboardFocus.getStage() == null) previousKeyboardFocus = null;
			Actor actor = stage.getKeyboardFocus();
			if (actor == null || actor.isDescendantOf(this)) stage.setKeyboardFocus(previousKeyboardFocus);

			if (previousScrollFocus != null && previousScrollFocus.getStage() == null) previousScrollFocus = null;
			actor = stage.getScrollFocus();
			if (actor == null || actor.isDescendantOf(this)) stage.setScrollFocus(previousScrollFocus);
		}
		if (action != null) {
			addCaptureListener(ignoreTouchDown);
			addAction(sequence(action, Actions.removeListener(ignoreTouchDown, true), Actions.removeActor()));
		} else
			remove();
	}
704876
public function mute(bool $mute = true): SpeakerInterface
    {
        $this->speaker->mute($mute);
        return $this;
    }