Notify that the entry was viewed.

@param int $id The entry ID.
@return array of warnings and status result
@since Moodle 3.1
@throws moodle_exception
@throws invalid_parameter_exception
320685
public static function view_entry($id) {
        global $DB, $USER;

        $params = self::validate_parameters(self::view_entry_parameters(), array('id' => $id));
        $id = $params['id'];
        $warnings = array();

        // Get and validate the glossary.
        $entry = $DB->get_record('glossary_entries', array('id' => $id), '*', MUST_EXIST);
        list($glossary, $context, $course, $cm) = self::validate_glossary($entry->glossaryid);

        if (!glossary_can_view_entry($entry, $cm)) {
            throw new invalid_parameter_exception('invalidentry');
        }

        // Trigger view.
        glossary_entry_view($entry, $context);

        return array(
            'status' => true,
            'warnings' => $warnings
        );
    }
721976
public function show($id)
    {
        $file = $this->fileRepo->getById($id);
        if (!empty($file)) {
            $this->authorize('read', $file);
            return $this->respondWithSuccess($file, new FileTransformer);
        }
        return $this->respondNotFound();
    }
477944
public function show($id)
	{
		$entity = $this->getModel()->getRepository()->getById($id);

		return $this->response()
			->item($entity)
			->view($this->getView('show'), [
				'entity' => $entity
			]);
	}
1134220
public function peek(string $id)
    {
        if (!isset($this->registered[$id])){
            return null;
        }
        return isset($this->instances[$id]) ? $this->instances[$id] : null;
    }
528894
public function read($id)
    {
        $thread = Thread::find($id);
        if (!$thread) {
            abort(404);
        }

        $thread->markAsRead(Auth::id());
    }
231395
public function check_result($id)
  {
    if ( $d = $this->get($id) ){
      $t = new bbn\util\timer();
      $t->start();
      $res = $this->_exec($d['request'], $d['params']);
      $duration = (int)ceil($t->stop() * 1000);
      if ( $res !== $d['result'] ){
        $this->db->update('bbn_observers', [
          'result' => $res,
          'duration' => $duration
        ], [
          'id' => $id
        ]);
        return false;
      }
      return true;
    }
  }
810434
public static function isDismissed( $id ) {
		$dismissed = false;
		$id = sanitize_key( $id );

		// Get all of the notices this user has dismissed.
		$dismissals = get_user_meta( get_current_user_id(), 'boldgrid_dismissed_admin_notices' );

		// Loop through all of the dismissed notices. If we find our $id, then mark bool and break.
		foreach ( $dismissals as $dismissal ) {
			if ( $id === $dismissal['id'] ) {
				$dismissed = true;
				break;
			}
		}

		return $dismissed;
	}
1097721
public function activate($id)
    {
        $id = (int) $id;
        if ($id <= 0) {
            throw new Exception('Invalid param id');
        }
        $data = [];
        $data['id'] = $id;
        $data['status'] = 'active';
        return $this->update($data);
    }
320765
public function archive($id)
    {
        $id = (int) $id;
        if ($id <= 0) {
            throw new Exception('Invalid param id');
        }
        $data = [];
        $data['id'] = $id;
        $data['status'] = 'archived';
        return $this->update($data);
    }
746669
public function view($id = null) {
        $cmsContent = $this->CmsContent->get($id, [
            'contain' => ['CmsPermission', 'CmsTermRelation']
        ]);
        $this->set('cmsContent', $cmsContent);
        $this->set('_serialize', ['cmsContent']);
    }
1150051
public function checkInvoiceStatus($id)
    {
        try {
            $url      = $this->server_root . str_replace("[id]", $id, $this->api_uri_check_payment);
            $data     = $this->createHTTPData($url , array());
            $client   = new Client();
            $response = $client->get($url, $data);
            $body     = (string) $response->getBody();
            return json_decode($body , true);
        } catch (ClientException $e) {
            if ($e->hasResponse()) {
                return $e->getResponse();
            }
        } catch (Exception $e){
            return $e->getTraceAsString();
        }
    }
847882
public function getStatus($id)
    {
        if ($this->isSuccess()) {
            foreach ($this->getResult() as $row) {
                if ($row['id'] == $id) {
                    return $row['status'];
                }
            }
        }

        return false;
    }
945617
function getAwaitingsByID(string $id) {
        $objs = array();
        
        foreach($this->awaiting as $key => $value) {
            if(\strpos($key, $id) !== false) {
                $objs[$key] = $value;
            }
        }
        
        return $objs;
    }
32728
public function open($id)
    {
        return $this->api->request('PUT', '/notifications/'.$id, [
            'Authorization' => 'Basic '.$this->api->getConfig()->getApplicationAuthKey(),
        ], json_encode([
            'app_id' => $this->api->getConfig()->getApplicationId(),
            'opened' => true,
        ]));
    }
1257948
public function show($id = null)
    {
        if ($id === 'new') {
            return response()->json([
                'entry' => WinkTag::make([
                    'id' => Str::uuid(),
                ]),
            ]);
        }

        $entry = WinkTag::findOrFail($id);

        return response()->json([
            'entry' => $entry,
        ]);
    }
523478
public function actionIndexPost($id=NULL)
	{
		if ($id === NULL)
			return $this->createComment();
		else
			return $this->updateComment($id);
	}
1112037
public function actionViewReceived($id = null)
    {
        $model = MessageReceiver::find()->where([
                'and',
                ['id' => $id, 'receiver_id' => User::loggedId()],
                ['!=', 'receiver_status', MessageReceiver::STATUS_DELETED]
            ])->limit(1)->one();
        if (empty($model)) {
            $this->error(Yii::t('podium/flash', 'Sorry! We can not find the message with the given ID.'));
            return $this->redirect(['messages/inbox']);
        }
        $model->markRead();
        return $this->render('view', [
            'model' => $model->message,
            'type' => 'received',
            'id' => $model->id
        ]);
    }