@param int $id

@throws HttpException

@return ActionEntity
185790
public function convert($id)
    {
        $action = $this->adapter->post(sprintf('%s/images/%d/actions', $this->endpoint, $id), ['type' => 'convert']);

        $action = json_decode($action);

        return new ActionEntity($action->action);
    }
87895
public function getOne($id)
    {
        $result = $this->entity->findFirst($id);
        if ($result->countResults() == 0) {
            // This is bad. Throw a 500. Responses should always be objects.
            throw new HTTPException('Resource not available.', 404, [
                'dev' => 'The resource you requested is not available.',
                'code' => '43758093745021'
            ]);
        } else {
            return $result;
        }
    }
1173686
private function load($id)
    {
        $fields = $this->getDbConnection()->fetchAssoc('SELECT * FROM `'.$this->objectDefinition->table.'` WHERE id = ?', array($id));
        if (!$fields) throw new \Exception('Object '.$this->objectDefinition->table.':'.$id.' is not found'); 
        $this->setFields($fields);
        $this->_id = $id;
        return $this;
    }
415158
public function getEntityById($id)
    {
        return isset($this->entitiesById[$id]) ? $this->entitiesById[$id] : null;
    }
824908
public function get(int $id)
    {
        if ($id === null) {
            return null;
        }

        if (isset($this->entities[$id])) {
            return $this->entities[$id];
        }

        // Entities are mutable
        // Search through the previously null-id entities
        // in case an id has been set now.
        foreach ($this->nullIdEntities as $entity) {
            if ($entity->getId() === $id) {
                return $entity;
            }
        }

        return null;
    }
993792
public function deleteAction($id)
    {
        /** @var PostInterface $post */
        $post = $this->get('opifer.form.post_manager')->getRepository()->find($id);

        if (!$post) {
            return $this->createNotFoundException();
        }
        
        $form = $post->getForm();

        $em = $this->getDoctrine()->getManager();
        $em->remove($post);
        $em->flush();

        return $this->redirectToRoute('opifer_form_post_index', ['formId' => $form->getId()]);
    }
59526
public function getActions($id)
    {
        $actions = $this->adapter->get(sprintf('%s/volumes/%s/actions?per_page=%d', $this->endpoint, $id, 200));

        $actions = json_decode($actions);

        $this->meta = $this->extractMeta($actions);

        return array_map(function ($action) {
            return new ActionEntity($action);
        }, $actions->actions);
    }
1000491
public function setId(int $id): Website
    {
        Assert::greaterThan($id, 0);

        $this->id = $id;

        return $this;
    }
549701
public function selectAction($id)
    {
        $instance = $this->getManager()->find($id);
        // If instance exists
        if($instance) {
            $this->getRequest()->getSession()->set('instance', $instance);
            if($this->getWorker()) {
                $this->get('session')->getFlashBag()->add('success', 'Instance '.$instance->getName().' selected');
            }else {
                $this->get('session')->getFlashBag()->add('error', 'Instance '.$instance->getName().' cannot be selected');
            }
        }else {
            $this->get('session')->getFlashBag()->add('error', 'This instance does not exist');
        }
        
        return new RedirectResponse($this->generateUrl('ringo_php_redmon'));
    }
87042
public function getByID($id)
    {
        $site = $this->entityManager->getRepository('Concrete\Core\Entity\Site\Site')
            ->find($id);
        $factory = new Factory($this->config);
        if (is_object($site)) {
            return $factory->createEntity($site);
        }
    }
921064
public function deleteAction($id)
    {
        $delete = function($id) {
            $group = $this->getDoctrine()
                ->getRepository(static::$entityName)
                ->findGroupById($id);

            if (!$group) {
                throw new EntityNotFoundException(static::$entityName, $id);
            }

            $em = $this->getDoctrine()->getManager();
            $em->remove($group);
            $em->flush();
        };

        $view = $this->responseDelete($id, $delete);

        return $this->handleView($view);
    }
803007
public function toModelAttribute($id)
	{
		if ($id === null) {
			$id = self::VALUE_NULL;
		}

		if (! array_key_exists($id,	$this->_map) ) {
			throw new Exception('Conversion from SimpleWorkflow failed : no key found for id = '.$id);
		}
		$value = $this->_map[$id];
		return ($value === self::VALUE_NULL ? null : $value);
	}
36171
public function setId($id)
    {
        if (($content = $this->getContent()) instanceof FormInterface) {
            $content->setId($id);
        }

        return $this;
    }
629646
public function populate($id)
    {
        if (empty($id)) {
            throw new Exception('No identifier supplied for totp', Totp\Exception::NO_IDENTIFIER_SUPPLIED);
        }

        $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl() . '/' . urlencode($id));
    }
589086
public function actionView($id)
    {
        Url::remember('', 'actions-redirect');
        $model = $this->findModel($id);

        return $this->render('view', [
            'model' => $model,
        ]);
    }
100445
public function deleteAction($id)
    {
        $manager = $this->getTaskManager();
        $manager->remove($id);

        $this->getEntityManager()->flush();

        return $this->handleView($this->view());
    }
1016162
public function actionFrontend ($id)
		{
			$page = Page::find()->where([ 'guid' => $id ])->one();

			if ($page === null)
			{
				throw new \yii\web\HttpException(404);
			}
			$this->setTitle($page->title);
			$this->data('page', $page);
			$this->_tpl = '@pageViews/page';
		}