PHP code example of markup / contentful-sdk-bridge
1. Go to this page and download the library: Download markup/contentful-sdk-bridge library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
markup / contentful-sdk-bridge example snippets
use Markup\ContentfulSdkBridge\AdaptedAsset;
use Markup\ContentfulSdkBridge\AdaptedContentType;
use Markup\ContentfulSdkBridge\AdaptedEntry;
$space = 'content_space';
$locale = 'en-US';
/** @var \Contentful\Delivery\Resource\Entry $sdkEntry */
$markupEntry = new AdaptedEntry(
$sdkEntry,
$locale,
$space
);
/** @var \Contentful\Delivery\Resource\Asset $sdkAsset */
$markupAsset = new AdaptedAsset(
$sdkAsset,
$locale
);
/** @var \Contentful\Delivery\Resource\ContentType $sdkContentType */
$markupContentType = new AdaptedContentType($sdkContentType);