Nastavi viditelnost
@param int $id
@secured
@throws AbortException
6177
public function handleVisibility(int $id)
	{
		if ($this->isAjax()) {
			$page = $this->orm->pages->getById($id);
			$page->visible = !$page->visible;
			$this->orm->persistAndFlush($page);

			$this['list']->setDataSource($this->orm->pages->findById($id));
			$this['list']->redrawItem($id);
		} else {
			$this->terminate();
		}
	}
218840
public function actionDownloadFile($id): void
	{
		$this->sendResponse($this->app->logs->downloadFile($id));
	}
1119817
public function deleteRow($id)
    {
        if ($id === self::ID_SUMMARY_ROW) {
            $this->summaryRow = null;
            return;
        }
        if (!isset($this->rows[$id])) {
            throw new Exception("Trying to delete unknown row with idkey = $id");
        }
        unset($this->rows[$id]);
    }
1132995
public function renew(int $id)
    {
        $this->updates[$id] = $this->now + $this->timeout;
    }
1224810
public function deleteById($id)
    {
        try {
            $obj = $this->getById($id);
            $this->delete($obj);
            return true;
        } catch (\Exception $e) {
            throw $e;
        }
    }
183292
public function delete($id)
    {
        $this->loadModel('User.Users');
        $user = $this->Users->get($id, ['contain' => ['Roles']]);

        if (in_array(ROLE_ID_ADMINISTRATOR, $user->role_ids) &&
            $this->Users->countAdministrators() === 1
        ) {
            $this->Flash->danger(__d('user', 'You cannot remove this user as it is the last administrator available.'));
        } else {
            if ($this->Users->delete($user)) {
                NotificationManager::canceled($user)->send();
                $this->Flash->success(__d('user', 'User successfully removed!'));
                $this->redirect($this->referer());
            } else {
                $this->Flash->danger(__d('user', 'User could not be removed.'));
            }
        }

        $this->title(__d('user', 'Remove User Account'));
        $this->redirect($this->referer());
    }
592966
public function setID($id)
    {
        if($id !== null && substr($id, 0, 1) !== '/')
            throw new Exception("invalid file id, must start with a /");
        $this->id = $id;
    }
1089849
public function destroy($id)
    {
        $language = Language::find($id);
        $destroyResult = parent::destroy($id);

        if ($destroyResult) {
            \File::deleteDirectory(resource_path('lang/'.$language->abbr));
        }

        return $destroyResult;
    }
32068
public function handleNextImage(int $id): void
	{
		if ($this->request->isAjax()) {
			$row = $this->getStorage()->getNext($id);
			if ($row) {
				$this->template->viewImage = $row;
				$this->redrawControl('image');
			} else {
				throw new AbortException;
			}
		} else {
			throw new AbortException;
		}
	}
1053562
public function deleteStatus(string $id): void
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use delete() instead.', __METHOD__), E_USER_DEPRECATED);

        $this->client->delete($this->prepareUrlForKey('delete-status', ['id' => $id]));
    }
655424
public function setId( $id )
	{
		if ( $id === null ) {
			$this->_modified = true;
		}

		$this->_values['id'] = $id;
	}
1229497
public function actionEdit(int $id): void
	{
		$this->content = $this->orm->content->getById($id);
		if (!$this->content) {
			$this->error();
		}
	}
256218
public function delete(string $id)
    {
        $this->setFile($id);
        if (file_exists($this->file)) {
            if ($this->versionamento) {
                $dadosAtuais = $this->get($id);
                $dadosAtuais['userlogin-action'] = "delete";
                unset($dadosAtuais['id']);
                parent::createVerion($this->file, $dadosAtuais);
            }
            unlink($this->file);
        }
    }
1313854
public function revoked($id)
    {
        $client = $this->find($id);

        return is_null($client) || $client->revoked;
    }
1163428
public function delete($id)
    {
        $this->_deletedDirty = true;

        if (extension_loaded('bitset')) {
            if ($this->_deleted === null) {
                $this->_deleted = bitset_empty($id);
            }
            bitset_incl($this->_deleted, $id);
        } else {
            if ($this->_deleted === null) {
                $this->_deleted = array();
            }

            $this->_deleted[$id] = 1;
        }
    }
545537
public function setVisible(int $id): void
    {
        $this->logger->logCall(__METHOD__, ['location' => $id]);
        $this->persistenceHandler->locationHandler()->setVisible($id);

        $this->cache->invalidateTags(['location-path-data-' . $id]);
    }
610660
public function handleRemove(int $id) : void
    {
        if ($this->presenter->isAjax() && $this->presenter->user->isAllowed(CategoryAuthorizator::RES_REMOVE))
        {
            $this->categoryEntity = $this->categoryRepository->findOneById($id);

            $this->categoryManager->delete($this->categoryEntity);

            $this->presenter->notificationAjax(
                'Kategorie odstaněna',
                "Kategorie '{$this->categoryEntity->getName()}' byla úspěšně odstaněna.",
                'success',
                FALSE
            );

            $this->presenter->handleModalToggle('hide', '#wakers_category_remove_modal', FALSE);

            $this->onRemove();
        }
    }