PHPackages                             hoppinger/preview\_entity - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. hoppinger/preview\_entity

ActiveDrupal-module[API Development](/categories/api)

hoppinger/preview\_entity
=========================

Drupal module to provide preview functionality to the Headless CMS

00PHP

Since Dec 8Pushed 4y ago2 watchersCompare

[ Source](https://github.com/hoppinger/preview_entity)[ Packagist](https://packagist.org/packages/hoppinger/preview_entity)[ RSS](/packages/hoppinger-preview-entity/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Preview entity
--------------

[](#preview-entity)

This module is built to provide a preview functionality to a Headless drupal website. It provides an endpoint which can be used to fetch the data per revision of the node.

The user navigates to \[FRONTEND URL\]/preview/\[ENTITY TYPE\]/\[ENTITY ID\]/\[REVISION ID\]?token=\[VALIDATION TOKEN\].

Drupal presents this URL in the interface to the user. Drupal can construct the path part of this URL very easily. The validation token URL parameter is constructed by Drupal using the following process. For the process it uses the following parameters:

- Timestamp: a unix timestamp number, in seconds since the epoch. The timestamp indicates the time until the link should be valid. So it is not the current time.
- Entity \*: Parameters that indicate which entity should be previewed.
- Shared secret: A secret key that is shared between the Drupal and .Net applications. It should be kept a secret, because with it an attacker can generate preview URLs for unpublished content.

The frontend application receives the request to the specified URL, extracts the entity and revision parameters from the path and the token parameter and validates them

### Configuration

[](#configuration)

Update the settings.php file to include these parameters

```
$settings["frontend_domain_url"] = "FRONTEND_DOMAIN_URL";
$settings["shared_secret"] = "SHARED_SECRET";
$settings["preview_valid_days"] = "5";
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23648809?v=4)[Ashwini Mone](/maintainers/ashwinimone)[@ashwinimone](https://github.com/ashwinimone)

![](https://avatars.githubusercontent.com/u/10885177?v=4)[Giuseppe Maggiore](/maintainers/giuseppemag)[@giuseppemag](https://github.com/giuseppemag)

![](https://avatars.githubusercontent.com/u/5929758?v=4)[Amit Ajgaonkar](/maintainers/amitajgaonkar)[@amitajgaonkar](https://github.com/amitajgaonkar)

---

Top Contributors

[![ashwinimone](https://avatars.githubusercontent.com/u/23648809?v=4)](https://github.com/ashwinimone "ashwinimone (3 commits)")

### Embed Badge

![Health badge](/badges/hoppinger-preview-entity/health.svg)

```
[![Health](https://phpackages.com/badges/hoppinger-preview-entity/health.svg)](https://phpackages.com/packages/hoppinger-preview-entity)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
